Can someone know that I dreamt about them?
Normally not. But if God wills, it can happen that two people see each other in a dream at the same time and with the same content.
Almost everyone has dreamt about a friend, a relative or an acquaintance. Afterwards one sometimes wonders whether the other person sensed anything. Perhaps they even had the same dream?
As a rule, the other person knows nothing about it. When you see someone in a dream, it is an experience of the dreamer. The person you dream about takes no part in that dream and usually has no idea that they appeared in it.
There are exceptions, though. It does happen that two people see each other in a dream on the same night, with exactly the same content. This is remarkable and rare. It does not happen by itself, but only when God wills it.
The Holy Qur’an describes sleep as a state in which the soul is in God’s hands. What a person experiences in sleep, and whether someone else shares in it, is therefore not in our power. As the second verse above says, people know of the unseen only as much as God grants them.
So one should not conclude from a dream about someone that they know about it or felt anything. But if two dreams ever match exactly, one may see in this a sign of God at work.