^Disagree, and then there the events of The Enterprise Incident, while not an invasion of a planet, a ship did deliberately invade Romulan territorial space. It was the correct thing for the Federation to do in order to protect themselves, but it was still an invasion.
Then there is the TNG episode The Outrageous Okona, the Enterprise Dee entered the the Omega Sagitta system seemingly without the permission of either of the two governments of that system. These were not a technologically primitive people, but rather a species with interplanetary travel and
the ability to communicate.
The Enterprise Dee sailed in like the locals had no say in who could enter their system.