I know that traditionally European monarchies had strict rules governing the honors presented to visiting nobility based on their rank and lineage. However, during the 19th and early 20th centuries nations like the United States and the French Republic, who have no monarch, were economic and military great powers. Were the President of one of these nations (or other high official such as a foreign minister/secretary of state) to visit a European Monarchy would they be received in the same manner as a King? Or was their station viewed as inferior?
One moment in history that is worth paying attention to is the famous funeral of King Edward VII of the United Kingdom on May 20, 1910. This gathering was perhaps the largest assemblage of royalty in modern history; many of the assembled monarchs would be at war with each other a few years later. The formalities observed for that occasion — and for subsequent royal British funerals — shed a great deal of light on the relative ceremonial respect given to republics by an old-style European monarchy.
Per the May 20, 1910 New York Times (PDF) and other sources, the order of the funeral procession was roughly as follows:
The sitting president of the United States (Taft) did not attend the funeral, and as near as I can tell, no sitting president has ever attended a British royal funeral. Still, the representatives of two of the greatest countries in the world were placed well back in the procession, behind not just the monarchs of small countries like Belgium, but also behind dukes and princes with distant or no family connection to the deceased monarch.
The Times also notes a minor kerfuffle over the clothes that Roosevelt and Pichon would wear, as representatives of republics, to the royal funeral.
Fast forward 26 years to the death of Edward's son, King George V. This funeral attracted only five kings instead of nine: the monarchs of Norway, Denmark, Belgium, Bulgaria and Romania. In an update from 1910, the president of France, Albert Lebrun, did attend the funeral; he was treated as a "guest of honor, for he is the head of a State and ranks as a reigning sovereign." The Times notes that a dinner for the kings excluded non-royal guests (aside from Lebrun); this was possibly due to diplomatic sensitivity about Grand Duke Dimitri of Russia, an exiled Romanov and the king's relative, attending a dinner with Maxim Litvinoff, the Soviet envoy (and yes, the Soviets sent an envoy to a 1936 Royal funeral!).
"The result was that Norman H. Davis, the representative of the United States, Mr. Litvinoff and the representatives of other countries without crowns did not attend the dinner," the Times says, though they attended a reception. (At that reception, the new king Edward VIII attracted attention by having a "long, animated conversation" with the ambassador and foreign minister of Nazi Germany, Edward — forced to abdicate for marrying a divorcee within a year, and thus not on the throne during World War II — being noted for his "personal liking for Germans.")
The funeral procession the next day followed a similar order of precedent: the new king and his brothers followed the coffin, followed by monarchs and the president of France, then various crown princes from other countries. Then came female royal relatives, and finally, on foot, "high diplomats, statesmen, field marshals and admirals of foreign lands." This included the representatives of the United States, Germany, and the Soviet Union — the latter two having such negative feelings toward each other that they had to be separated in the line of march by Argentina's ambassador to France.
In February 1952, on the death of George VI, the order was mixed up slightly — the new monarch was female, Queen Elizabeth, so the carriage with the king's daughter, widow and other female attendees was first behind the coffin, followed by royal dukes, seven monarchs (including the King of Iraq) and an array of princes. The president of France, Vincent Auriol, walked with the monarchs. U.S. Secretary of State Dean Acheson "walked with the diplomats representing countries that were unable to send their heads of state" near the back. Also present at the funeral was General Dwight Eisenhower, then the commander of NATO and a few months away from resigning as a general to run for president; it's unclear where or if he walked in the procession.
So we've got a few things going on in these three royal ceremonies:
Hopefully that is helpful! The New York Times' TimesMachine is an invaluable tool for research.