It's not about the rings, it's an innate ability.
Copy-pasting from another answer I made:
Ósanwe means "communication of thought" in quenya.Tolkien wrote a eight page essay about it named Ósanwe-kenta. Note that the narrator is not Tolkien but an elvish loremaster.
What is Ósanwe?
To be very simplistic about it, it's telepathy. It allows to send thoughts to another mind, and to read other minds.
This ability is available in theory to all men, elves, maiar and Vala.
In pratice, humans are very limited:
Men have the same faculty as the Quendi, but it is in itself weaker, and is weaker in operation owing to the strength of the hröa, over which most men have small control by the will.
The mightiest of Men, such as Denethor, can read minds at will. Sending thoughts is possible to the greatest of the elves:
Often after the hobbits were wrapped in sleep they [Celeborn, Galadriel, Gandalf, and Elrond] would sit together under the stars, recalling the ages that were gone and all their joys and labours in the world, or holding council, concerning the days to come. If any wanderer had chanced to pass, little would he have seen or heard, and it would have seemed to him only that he saw grey figures, carved in stone, memorials of forgotten things now lost in unpeopled lands. For they did not move or speak with mouth, looking from mind to mind; and only their shining eyes stirred and kindled as their thoughts went to and fro.
All communication was consensual, as any mind could choose to remain closed except from Eru.
The effort required for communication could be lessened by three factors, affinity, urgency, authority:
The Incarnates have by the nature of sáma the same faculties; but their perception is dimmed by the hröa, for their fëa is united to their hröa and its normal procedure is through the hröa, which is in itself part of Eä, without thought. The dimming is indeed double; for thought has to pass one mantle of hröa and penetrate another. For this reason in Incarnates transmission of thought requires strengthening to be effective. Strengthening can be by affinity, by urgency, or by authority.
Affinity may be due to kinship; for this may increase the likeness of hröa to hröa, and so of the concerns and modes of thought of the indwelling fëar, kinship is also normally accompanied by love and sympathy. Affinity may come simply from love and friendship, which is likeness or affinity of fëa to fëa.
Urgency is imparted by great need of the "sender" (as in joy, grief or fear); and if these things are in any degree shared by the "receiver" the thought is the clearer received. Authority may also lend force to the thought of one who has a duty towards another, or of any ruler who has a right to issue commands or to seek the truth for the good of others.
Morgoth's perversion of Ósanwe
Then Morgoth (and then Sauron) decided to pervert Ósanwe, and to implant his own thoughts in the mind of others. However, it still required consent:
In like manner, extortion of the secrets of a mind may seem to come from reading it by force in despite of its unwill, for the knowledge gained may at times appear to be as complete as any that could be obtained. Nonetheless it does not come from penetration of the barrier of unwill.
So how Morgoth did it?
He found that the open approach of a sáma of power and great force of will was felt by a lesser sáma as an immense pressure, accompanied by fear. To dominate by weight of power and fear was his delight; but in this case he found them unavailing: fear closed the door faster. Therefore he tried deceit and stealth.
Here he was aided by the simplicity of those unaware of evil, or not yet accustomed to beware of it. And for that reason it was said above that the distinction of openness and active will to entertain was of great importance. For he would come by stealth to a mind open and unwary, hoping to learn some part of its thought before it closed, and still more to implant in it his own thought, to deceive it and win it to his friendship.
Several objects were crafted to make the use of Ósanwe easier: the Palantiri, by Feanor.