I think you're mixing up some details of that episode. The closest episode I can think of that matches that is "The Ensigns of Command", which involves a colony of humans that were isolated and underdeveloped due to interference from the planet's radiation. The colony was on a planet that technically belonged to the "Sheliak", a mysterious race the Federation had limited contact with, but who had decided to begin colonizing the planet and gave the Federation a short time span to remove the humans before they would eradicate them.
I looked it up, and the title of the episode was "The Emissary" [S2E20] (although, yes, either I remembered a few details incorrectly or the Wikipedia synopsis of the plot is incomplete).