I think Kirk's aggressiveness on the ryetalin falls under what we today call "eminent domain." Starfleet will situationally exert ownership over private property when there is an exigent public need, and may not always do so in a fair or explanatory manner. Crisis tends to give people a sense of entitlement to force others to "do the right thing."

As for buying an entire planet, I can imagine this wouldn't be all that difficult if you found a king/prince/sultan who owned several small, unused worlds and your offering price was an irresistible fembot, programmed to the seller's specifications.