In 1740s France, the gendarmerie was heavy cavalry in the military, not a civilian police force.
The events of this episode are set in 1744, at the earliest. In 1742, the English were engaged in the War of Austrian Succession on the side opposing the French for the following 7 years, at the least.
In 1744, an English officer appearing near the entourage of the French king would have been immediately apprehended and placed under arrest.
A Duke of Sandringham, as part of the English royal leadership, would have been admitted to the kingdom, most likely, only under the auspices of safe travel ensured by Prince Charles in support of deposing King George II of England, the enemy of King Louis XV of France.