And they weren't exactly a "primitive" society.
That's not an issue. People make the mistake of assuming the PD applies only to "pre-warp" societies, but it's about respecting the autonomy of
every society, including technologically advanced, post-contact ones. The PD is the reason Starfleet couldn't intervene in the Klingon Civil War in "Redemption" and the Circle's coup on Bajor in DS9's second-season opening arc until they discovered they were the result of outside intervention (from the Romulans and Cardassians respectively); as long as they were seen as internal matters, they were part of the cultures' natural development and the Federation couldn't interfere. The PD is also why Janeway wouldn't share transporter tech with the Kazon, and why in "Prototype" she wouldn't allow Torres to help the androids reproduce, because it would change the balance of power. Conversely, in "Counterpoint," when she helped the telepaths escape extermination by the Devore, Kashyk specifically called her out for violating the Prime Directive by meddling in their internal affairs.
(Although I've never thought the PD would forbid granting sanctuary or aid to people fleeing from an oppressive state. As long as you don't actively try to overthrow the state or provide military aid to a rebellion, as long as you just help people leave the society, you're not actually altering the society, especially if they would've been killed anyway. There was an early DS9 comic that had Sisko wrestle with granting refugees asylum because of the PD, but I never found that credible.)
Of course, we've been saying how the TOS-era PD and the TNG-era version were interpreted differently, but it comes up in the TOS era too. In "The Magicks of Megas-tu," Kirk describes General Order One (the alternate, and probably more official, name of the Prime Directive) as stating that "No starship may interfere with the normal development of any alien life or society."
Any society, not just those below a certain technological threshold. Of course, it's easier to disrupt a society's development if you have a massive power advantage over them, which is why it tends to be applied mainly in those cases, but the rule applies to every society. (So if anything,
Voyager's crew taking Q's side in the Q Civil War was a Prime Directive violation, because it affected the development of the Qs' society.)
In "Bread & Circuses" it was noted Starfleet officers swore an oath to the PD and would rather die that violate that oath. Makes me wonder a bit when that scenario would come into play?
I think that applies more to blatant, wholesale intervention of the sort the Proconsul talked about, invading with troops or blasting the planet into ruins from orbit. Or in "The Omega Glory," the kind of thing Tracey did, supplying one side with phasers to slaughter the other. I don't think it applied to more subtle influences, like the younger Kirk revealing his alien origin to Tyree on his first mission there, or to Kirk in "Omega" reminding the Yangs of the meaning of the sacred words they already had. It's more just about being willing to sacrifice yourself to avoid being responsible for the mass death of others.
Also, of course, as I've been saying, the things Kirk did that modern fans misread as violating the PD were actually attempts to uphold it by negating other sources of interference/restriction on their free development. So I don't think it ever really came up.