The Sigma Iotia incident ("A Piece of the Action") has also been brought up in this thread. Was Kirk wrong? Was the Federation wrong? I'd say in the "present tense" (TOS era), the answer was "no" to both questions. The episode strongly indicates two things: (1: the Starship Horizon's first contact with Sigma Iotia predated the Prime Directive being codified; and, possibly... (2: the Horizon could have herself been pre-Federation. IIRC, the Horizon was never referred to as a Federation starship. It could be that the Enterprise was dispatched to the planet only to take responsibility ("in for a penny, in for pound") for the Horizon's prior interference regardless of who actually sowed the seed.
While it is true that the Horizon was never directly referred to as a Federation starship it is implied
it was one:
OXMYX [OC]: Hello, Captain. You're from the same outfit as the Horizon
Unfortunately, the Horizon was lost with all hands shortly after leaving your planet. We only received her radio report last month.
Thought to be fair TOS played very fast and loose with its past even when referencing the time period it supposedly occurred in. For example Squire of Gothos clearly sets Star Trek in the 28th
JAEGER: Notice the period, Captain. Nine hundred light years from Earth
. It's what might be seen through a viewing scope if it were powerful enough.
TRELANE: Ah, yes. I've been looking in on the doings on your lively little Earth.
KIRK: Then you've been looking in on the doings nine hundred years past
TRELANE: A matched set. Just like the pair that slew your heroic Alexander Hamilton.
And Captain, I never miss. (For reference Alexander Hamilton was killed July 12, 1804)
These two statements taken together set this episode c2704. Can you oops they really goofed?