All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
There is no doubt that what you did was not right, because it is impermissible to perform Tayammum if water is available and the person is able to use it; Allah, the Exalted, says (what means): {...and you find no water, then seek clean earth...} [Quran 4:43] The same goes for asking someone about the Qiblah (prayer direction) while you do not know if he is Muslim, let alone if he is trustworthy or not. This is not sufficient (i.e. you cannot act upon what he tells you). Ar-Rawdh Al-Murbiʻ maʻa Haashiyatih reads, "If he is informed of the direction of the Qiblah by a Muslim who is competent for religious assignment, is trustworthy inwardly and outwardly, and knows it with certainty, then he acts upon it; but he does not act upon what he is told by a young person or an impious person."
Allah knows best.