What is perhaps being ignored in all of this is one itsy teensy detail...
Laws and Treaties etc.
For example, what happens should a world decide that armed merchant ships are illegal? Shipboard lasers are definitely higher powered than laser rifles no? Perhaps the local rules for where ships can fly through air space would also apply.
Then there is the issue of what laws does a starship captain apply within the confines of his hull at any given time? Today's modern laws regarding the territoriality of the flagging of a ship would give a hint no?
So, simply stated - ships in transit to an imperial starport have to have some rights to land within the confines of the port itself without interference by the locals. On the flip side, treaties negotiated with a world's government would hold sway over the actions of both signatories to the treaty.
Now, let's throw a curveball into this equation:
Suppose the local government with whom the treaty was enacted, is deposed by a local coup? Suppose the new government tries to tell the Imperium to take a hike with respect to contractual obligations and debts etc - that the new government wants to say it doesn't own now that the old government is gone? Does ANYTHING within the Traveller rules sets from any publication or system - tell the GM what happens then? Hell, does it even say what is the difference between a world that was conquered and brought into the Imperium vs a world that voted to join? There has to be SOME difference right?
In the end? It is up to the GM to make head/tails out of the mess that evolved over the past 40+ years of game evolution.
Starports may very well have to obey certain air traffic laws established by the world's government by right of treaty. By right of treaty, worlds have to respect territoriality laws of the Imperium. And when things get sticky, woe be unto either the planetary government or the Imperial representative - who violates the treaty. Imagine a red zone being slapped upon a world because things got bad enough for that to occur. Imagine that once slapped upon a world, it takes MONTHS before it can be lifted, possibly even years? Imagine ONE government willing or foolish enough to risk that knowing that such a red zone classification could be made relatively permanent. Then imagine what it takes to enforce a red zone and ask "Are you willing to tangle with a strike force sent to enforce a red zone proclamation knowing that to fire upon one Imperial Naval vessel is to fire upon them all?
Your call. Truth is - I've always wondered what happens should a world decide it no longer wishes to be deemed an Imperial puppet. I've wondered how the concept of separate but equal governments in the form of subsector Dukes even works *teasing grin* with the laws as written. Either the Imperium is supreme or it isn't. Hell, as can be found elsewhere, I've often wondered what the difference is between an Imperial Citizen and an Imiperial Subject (after all, if something is not a capital offence under Imperial Law, but a capital offence under planetary law - are those who are bound by planetary law even Imperial Citizens?)
In the end, you as GM, make it work. Even GURPS NOBLES failed to do a decent job (in my opinion) and often created something I looked at, and said with a flat tone of voice... "Um, no."