Couple of questions regarding the Prime Directive:
1) Is it the Prime Directive that requires the Federation to only offer membership to worlds that have unified under a government that can represent the entire planet? 'Cause if there were still factions, then dealing with one faction or another could constitute unacceptable interference. Am I even right that there is such a rule, or does it only seem that way?
2) Isn't it a bit convenient that the Prime Directive allows the Federation to trade with worlds regardless of what kind atrocities might be happening on those worlds?
Neither of these are Prime Directive related. The Prime Directive is a first contact protocol, forbidding Starfleet officers from interfering in the natural development of pre-warp societies and forbidding Starfleet officers from making contact with them. Also, the Prime Directive is a Starfleet regulation, the rest of the Federation isn't required to follow it (as stated in TNG's Angel One).
But, in answer to your questions, yes generally a world does need a unified governemnt to be permitted Federation membership. We do know that Kesprytt was considered for membership despite having a territory that wasn't part of the unified global government, but likely due to the events of the episode their membership was rejected.
And so what if the Federation trades with less than pleasant planets? They need exotic mineral 47, and only providers of exotic mineral 47 are the Space Nazis, who obtain EM 47 through concentration camps on a world they annexed and force the native inhabitants to labour in harsh condtions. Since Annexed World is outside Federation territory and fits the legal definition of a Space Nazi world as established in the treaty, there isn't anything the Federation can do. These kind of politics go on in the real world, why won't they continue in the interstellar community of the future?