Neither
Gondor nor
Rohan (nor while it existed,
Arnor) were parliamentary monarchies as is now the case with the United Kingdom, the Netherlands, Belgium, Spain, Norway, Sweden or Denmark. But all forms of rule tended to have some form of council, perhaps with senior members having a rank of minister or something equivalent. And sometimes a chief councilor resembling a prime minister. Where the nobility below the monarch was strong, these would probably consist of the hereditary heads, duke, counts and the like. Where a monarch was able to centralize power and reduce the influence of noble families, he (historically mostly he) would appoint the members of his council. Probably most royal councils were a mixture of the two.
For Rohan the natural councilors for the king would have been the marshals of
the Mark (
Gríma Wormtongue's position was highly
unnatural).
For Gondor under
Denethor, I can only think of Prince
Imrahil of
Dol Amroth, under
Aragorn additionally
Faramir as
Prince of Ithilien. But there must have been other councilors in both cases (in Rohan, too).
The Shire was an entirely different case. They had an elected Mayor (but JRRT never even hinted at who was eligible to vote), who was head of the postal system and the Shirriffs. Then the hereditary position of the Thain, for centuries residing with the Took family, while the Oldbuck family, who held the position earlier, had relocated east of the Brandywine River, their head becoming
the Master of Brandy Hall, almost an equivalent of the Thain.
Hard to think of something equivalent in human history. As we find out in the course of LotR, the
Hobbits' (mostly) carefree lives had been safeguarded, without their knowing it, by the
Rangers of the Dúnedain chieftains of the north. Things went wrong pretty quickly for the Hobbits when this
Ranger guard departed to join Aragorn in his quest after the Battle of
Helm's Deep.