Short Answer: Nobody knows the correct answer to this question.
Long Answer: I give a brief history of the Prime Directive and estimate the time span during which it was introduced. I then suggest eight possible answers. I hope those will be enough for someone to chose an answer that seems satisfactory.
"A Piece of the Action" is the 50th TOS episode produced (2 to 9 November 1967), the 46th episode by first airdate (12 January 1968), and has stardate 4598.0.
https://memory-alpha.fandom.com/wiki/A_Piece_of_the_Action_(episode)1
http://startreklist.blogspot.com/2011/04/list-of-all-star-trek-episodes-sorted.html2
In it is the following dialog:
KIRK: Boss? All right, Lieutenant, put him on. Oxmyx. This is Captain James T. Kirk of the starship Enterprise, representing the Federation of Planets.
OXMYX [OC]: Hello, Captain. You're from the same outfit as the Horizon?
KIRK: Yes. Unfortunately, the Horizon was lost with all hands shortly after leaving your planet. We only received her radio report last month.
OXMYX [OC]: Last month? What are you talking about? The Horizon left here a hundred years ago.
KIRK: Difficult to explain. We received a report a hundred years late because it was sent by conventional radio. Your system is on the outer reaches of the galaxy. They didn't have subspace communication in those days.
And:
KIRK: The Horizon's contact came before the Non-Interference Directive went into effect.
MCCOY: They must have interfered with the normal evolution of the planet.
SPOCK: It will be interesting to see the results of the contamination.
So the Prime Directive must have been decreed sometime after the Horizon visited Iota, which must have been about 100 years earlier give or take a number of years or decades to allow for human imprecision.
The Prime Directive is mentioned once in the first Season of TOS, in "The Return of the Archons", the 23rd TOS episode filmed (6-19 December 1966), the 21st episode aired (9 February 1967), and with stardate 3156.2.
Memory Alpha says it has the first mention of the Prime Directive.
https://memory-alpha.fandom.com/wiki/The_Return_of_the_Archons_(episode)3
KIRK: Landru must die.
SPOCK: Captain, our Prime Directive of non-interference.
http://www.chakoteya.net/StarTrek/22.htm4
"Tomorrow is Yesterday" was the 22nd TOS episode produced (28 November-5 December 1966) and the 19th aired (26 January 1967), and has stardate 3133.2.
So if one orders episodes by production order "Tomorrow is Yesterday" is slightly before "The Return of the Archons" and it is barely possible that the Prime Directive was decreed between the two episodes, meaning that it was not in force during "Tomorrow is Yesterday".
So if one orders episodes by stardate order "Tomorrow is Yesterday" is slightly (23.0 stardates) before "The Return of the Archons" and it is barely possible that the Prime Directive was decreed between the two episodes, meaning that it was not in force during "Tomorrow is Yesterday".
So if one orders episodes by broadcast or air date order "Tomorrow is Yesterday" is slightly before "The Return of the Archons" and it is barely possible that the Prime Directive was decreed between the two episodes, meaning that it was not in force during "Tomorrow is Yesterday".
"Tomorrow is Yesterday" is before "The Return of the Archons" in each of the three different orders that TOS episodes are usually ordered in. Therefore many fans would claim that "Tomorrow is Yesterday" certainly happens before "The Return of the Archons" and thus there is a possibility that the Prime Directive was introduced between the two episodes.
Of course if there is about an entire century during which the Prime Directive might have been decreed, the probability that might happen during a week or month between two first season episodes seems rather small, about 1 in 1,200 to 1 in 5,217.85. But it could possibly happen that way.
If the Prime Directive was in force during "Tomorrow is Yesterday" the crew might not have thought about whether it applied to a Federation planet in the past. I suspect that if any members of the TOS production staff suggested that Kirk was violating the Prime Directive in "Tomorrow is Yesterday" other staff members might answer that Kirk didn't think about whether the Prime Directive applied in such an unusual situation, and thus there was no need to add any dialog discussing the Prime Directive.
But in James Blish's novelization of "Tomorrow is Yesterday" once of the characters says that this situation is one where the Prime Directive is at its strongest.
In any universe including Star Trek: Into Darkness the Prime Directive was in effect years before "Tomorrow is Yesterday". Star Trek: Into Darkness happens in 2259 according to the official chronology, and "Tomorrow is Yesterday" happens in 2267, 8 years later, according to the official chronology. Kirk is reported for violating the Prime Directive in Star Trek: Into Darkness.
And it is possible that the Prime Directive has been or will be mentioned in Star Trek: Discovery.
If all the episodes tend to happen in alternate universes of their own, as is my theory, then "Tomorrow is Yesterday" could happen in an alternate universe without a Prime Directive and "The Return of the Archons" and other episodes could happen in alternate universes with Prime Directives.
Therefore, to sum up the possible answers:
1) It is possible that the Prime Directive was in effect in "Tomorrow is Yesterday" but Kirk, Spock, etc., didn't think about or discuss whether it was in effect in such an unusual situation.
2) The Prime Directive was enacted during the short period between "Tomorrow is Yesterday" and "The Return of the Archons".
3) "Tomorrow is Yesterday" might happen in an alternate universe without the Prime Directive, and "The Return of the Archons" and other episodes where the Prime Directive is mentioned happen in alternate universes with the Prime Directive.
4) If the reboot movies are considered canon, the situation might be as in 3), the reboot movies and "Return of the Archons" happen in alternate universes with the Prime Directive, and "Tomorrow is Yesterday" happening in an alternate universe without the Prime Directive.
5) If the reboot movies are considered canon, the situation might be as in 1), the Prime Directive being in force in both alternate universes, but Kirk & Co.. didn't consider or discuss whether the Prime Directive applied to their unusual situation in "Tomorrow is Yesterday".
6) If Star Trek: Discovery is considered canon and mentions the Prime Directive, the situation may be as in 1), the Prime Directive is in force in "Tomorrow is Yesterday" but Kirk & Co. don't consider or discuss whether it applies in their unusual situation.
7) If Star Trek: Discovery is considered canon and mentions the Prime Directive, the situation may be as in 3), perhaps Star Trek: Discovery is not in the prime timeline as its creators claim but in an alternate universe to TOS. So Star Trek: Discovery and "The Return of the Archons" and other episodes with the Prime Directive may be in alternate universes with the Prime Directive and "Tomorrow is Yesterday" may be in an alternate universe without the Prime directive.
8) If James Blish's novelizations of TOS episodes are canon, Kirk & Co. did realize that the Prime Directive did apply in their unusual situation, though apparently Kirk wasn't thinking about that when he ordered Christopher beamed aboard. If he had thought about Prime Directive issues in time, he would have ordered Christopher suspended in the transporter - like the Klingons in "Day of the Dove" - until they could return him safely to Earth without Christopher seeing anything about the future. If Christopher had a parachute in working order they could have transported him to about the place where his plane broke up and let him parachute to the ground, for example.