The Omega Glory transcript...There's not a chance in hell Fox could have possibly had the authority to give Kirk orders or to override him in any way.
Kirk, as captain of the Enterprise, is the absolute law. On the ship, Kirk is, quite literally, God. He's the captain, so what he says, GOES. That's the end of it.
Fox is not a member of Starfleet, he has absolutely no right to order Kirk around in any way. Kirk could have given Fox the gigantic middle finger and there wouldn't have been a damn thing Fox could do about it.
Hell, as much of a pain in the ass as Fox was, Kirk would have been well within his rights to confine Fox to quarters. I'm surprised he DIDN'T do that.
Fox is only an ambassador, nothing more. He carries no legal weight as far as Kirk is concerned. I mean, it's not like Fox is the Federation president or anything like that (under Federation law, the president is Commander in Chief of Starfleet, but Fox was certainly not that). Fox was just trading on his bluster, thinking that this would make Kirk back down. Fortunately, Fox lost.
As far as Kirk's actions towards Eminiar and Vendikar are concerned? It's been said. Kirk was defending his ship against a hostile intruder. He had the right to do whatever he wanted in that regard. The Prime Directive is null and void; Kirk's right of self defense is ABSOLUTE.
"Captain's log, supplemental. The Enterprise has left the Exeter and moved into close planet orbit. Although it appears the infection may strand us here the rest of our lives, I face an even more difficult problem. A growing belief that Captain Tracey has been interfering with the evolution of life on this planet. It seems impossible. A star captain's most solemn oath is that he will give his life, even his entire crew, rather than violate the Prime Directive."
Kirk should have allowed his ship to be destroyed rather than violate the Prime Directive. Do I agree with that? No, but it's canon.