Legally, the Federation cannot have jurisdiction over an inhabited planet that is not a member world of the Federation.
Straight out question, why not?
If the population were to be indigenous to the world this would certainly make a difference. But if the population were immigrants from elsewhere, that wouldn't automatically prevent the Federation from "claiming" a planet as being within their space.
Both the Federation and the Klingons "claimed" Sherman's Planet ('Tribbles), it wasn't simplistically a matter of who got there first. The Federation and the Cardassian Union fought for years over a piece of territory that they both "claimed," final agreeing to divide it up. In one case, the territory being colonized was already in dispute prior to the Human colonists traveling to the colony planet.
In the case of the ring planet, the established fact that the planet had a small number of refugee/residents already there doesn't preclude the Federation from viewing the planet as being within their space, and a part of Federation territory. The Baku mere presence on the surface did confer upon them ownership and sovereignty of the planet.
It made no difference if they (simplistically) "got there first."
The very existence of the Prime Directive is an indication of how seriously the Federation is supposed to take the idea of every people's right to their own sovereignty, regardless of how technologically developed they are.
The Federation Council's decision to order the removal of the Baku would indicate that the Council didn't view the Baku as possessing sovereignty over the planet.
Another problem here is the fact that the Federation doesn't even know up front that the Baku aren't native ...
I believe only Picard (and his crew) were initially under the impression that the Baku were e natives, and that didn't
last long. Dougherty was fully aware that the Baku were not indigenous to the ring planet, meaning the Federation Council (from whom Dougherty received his orders) was also fully aware.