Kirk went in under protest. He was fully prepared to turn around and leave Eminiar and Vendikar to their fucked up ways. But Kirk is overridden by Fox. That puts Kirk in the clear.
And Kirk isn't responsible for Eminiar's treaties particular since the Federation was never part of those agreements. So any attack on Kirk, his crew or his ship puts him in the right to defend himself. If the Eminians had simply asked Kirk and his landing party to leave and he had done so then everyone is happy. But Anan 7 orders them taken and to be killed---that's now unwarranted aggression. And so Kirk gives them a lesson: I was willing to be fair, but fuck with me and the Federation and you're toast.
If anyone is really to blame for the ensuing events it's Fox. Maybe another Ambassador would have agreed with Kirk and heeded the Eminians' warning to stay away. But Fox is obviously a pompous ass who has no clue what he's getting himself (and Kirk's crew) into.
I agree its not Kirk's fault but Starfleets through Fox. Kirk has to do the best he can under the circumstances.
If say Nero's ship started orbitting Earth I think Earth defenses would be in its rights to shoot it down regardless of any treaties. So Eminiar has a perfect right to attack Kirk's ship IMO.
However that doesn't mean Kirk has to lie down and take it. Since the ruling council started playing with Kirk and his crew, instead of just saying get lost then they sort of deserved being threatened with General Order 24. However, I don't think that gives Kirk the right to destroy the entire planet either.