Eminent domain? The Federation doesn't rule the Ba'ku, they rule themselves. There are plenty of planets encapsulated in Federation space which contain civilizations that are not members of the Federation.
Suppose the Feds land on a planet, meet the local civilization and discover that they have ample of dilithium yet are unwilling to give it away.
Do they have to rationalize themselves to the rest of the galaxy, do you suggest that the Feds should just take it from them? Why, because they are a larger club in which more people can benefit from dilithium?
No, the appropriate thing to do is to ask them and then negotiate for a price. If the price is too high for you that is your problem, not theirs and if they are unwilling to give it away even at a high price that is still your problem and not theirs. You might have something I care deeply about but I have no right to take it forcefully from you. Strange that one has to explain something which every little kid learns in the sandbox.
Well it depends WHAT the thing in question is. If it's a fuel source, then yes you're right, you either meet their price or they keep it or negotiate with someone else.
If it's a revolutionary medical resource that can cure most diseases, can regrow eyes, can extend life spans, etc., then you negotiate at first, but if that doesn't work, you certainly don't just shrug and walk away. Yes, you would eventually take it and administer it in a fair way that benefits the larger society.
And tell me you actually think that if the cure for cancer was found on some small group's land and they didn't want to move, that people would just shrug and say "oh well, we tried."