This is the way I see things playing out for example on Lemish:
Lemish has a high law level, indicating that no weapons are allowed for its citizenry or visitors. Planetary/system law enforcement, on the other hand, is armed at least in "special weapons teams" if not rank and file officers. Being caught with a weapon is a violation of Lemishian law, unless you are a member of the law enforcement communities or a licenced bodyguard.
The Imperial nobility, meaning the subsector duke, baron and knight, who all have the "right/privledge" to raise husclares, have a "right/privledge" of being armed. But being that Lemish is a civilized planet, (regardless of what the TAS says,

) such priveldge is largely cerimonial and limited to personal firearms and or blade. It does not extend to WMDs or NBC weapons. None of this vials of antrax for duck hunting.
Imperial agents of the MOJ, (or other appropriate ministries) are required to notify Starport Authority upon arrival. I conjecture that the Emperor may issue the equivalent of a "License to Kill" warrant, to a FEW agents, and this number of Imperial weapon holders will be so few that the probablity of one showing up on Lemish to be quite rare. About as common as 007 visiting Muncie Indiana.
So, on Lemish, local Law enforcement does not carry lethal weapons. There are Special Weapons teams available to local law enforcment. Huscarles and bodyguards may be armed, but are licenced. Nobility may be armed, but is generally not done, because of the lack of need. Imperial Agents outside the starport will need dispensation from local authorities but generally this is a minor formality and easily obtained. Lemish is a loyal planet of the Imperium, and aids the Emperor when ever it is needed.
Now, after the Imperial Navy leaves in 1116, all bets are off
