It's important to keep in mind that Middle-earth is not a single society, but many. Most, if not all, of those societies have a hierarchy, but there was no common system of nobility.
The title "Lord" is used by Tolkien for several people, including Elrond, Denethor and Celeborn. This doesn't imply that they received these titles from some common authority. Tolkien is using "Lord" as a generic title for a ruler or other great person.
Here are notes on titles used by various peoples.
Elves
Before the elves first arrived in Valinor, the heads of their houses were referred to as kings.
Thus Elwë's folk who sought him found him not, and Olwë took the kingship of the Teleri and departed, as is told hereafter.
The Silmarillion: Quenta Silmarillion, Chapter 4: Of Thingol and Melian.
Page 55 (George Allen and Unwin 1977 hardback edition).
Gondor
Gondor was originally ruled by Kings. When the King was away, his Steward would rule in his place until he returned. The Stewards were traditionally chosen from a single family, and the post eventually became hereditary.
In 2050 (Third Age), King Eärnur went away and never returned. His Steward Mardil remained in charge, and Mardil's descendants inherited his power "until the King should return".
At the time of the War of the Ring, we read of Prince Imrahil of Dol Amroth, the nephew of Denethor. The origin of his title is not explained, but it may simply refer to the fact that he was the ruler (under the Steward) of Dol Amroth.
Hobbits
The hobbits of the Shire originally acknowledged the authority of the King of Arnor. By the time of The Lord of the Rings, that kingship had died out and the hobbits thought little of it.
The head of the Tooks was referred to as the Thain, and he was in charge of the (rarely used) militia. This title is reminiscent of the Anglo Saxon term "Thegn" which referred to a retainer of the King (who usually had a military role).
But in that war the North Kingdom ended; and then the Hobbits took the land for their own, and they chose from their own chiefs a Thain to hold the authority of the king that was gone.
The Lord of the Rings Prologue, Section 3: Of the Ordering of the Shire
Page 8 (Single volume 50th Anniversary Edition)
The head of the Brandybuck family was known as the Master of Buckland. The origin of the tile is not explained in The Lord of the Rings, but as Buckland was outside the original borders of the Shire, it is possible that the Hobbits (or at least the Brandybucks) thought that it needed its own leader.
By the late Third age, the Thain and the Master these were mainly ceremonial titles.
The only real official in the Shire at this date was the Mayor of Michel Delving (or of the Shire)...
The Lord of the Rings Prologue, Section 3: Of the Ordering of the Shire
Page 8 (Single volume 50th Anniversary Edition)
Rohan
Rohan is ruled by a hereditary King. There are also three Marshals, although this appears to be a military appointment rather than a rank of nobility.