Maybe. Kirk is pulled of his course by Leighton and Kirk is pissed off by that. Leighton then uses Kirk's connection to him and the Tarsus IV Massacre to set Kirk on Karidian's trail. Not as a Starfleet Officer, but as a fellow survivor. Leighton's murder really lights the fire in Kirk to investigate. Spock seems oblivious to Kirk's investigation ( even though he was consulted about Karidian/Kodos earlier) remarking that taking the actors to Benecia will take them off course. Which implies Kirk is going slightly "rogue" here.^Again, though, it's a mistake to think about it in present-day terms, where authorities are always within reach. We're talking about events happening on the frontier, on far-flung interstellar colonies in an era when travel between worlds was supposed to take weeks or months. In such a context, a Starfleet captain might very well be the highest legitimate authority figure available. This is part of the originally defined premise for TOS -- the Enterprise's mission, according to the series proposal, included law enforcement and support for colonies and vessels on the otherwise lawless frontier. So you're wrong -- in that frontier context, Kirk was the legitimate authority.
Just how far out on the frontier are Planet Q and Benecia? Surely there are law enforcement and legal authorities there? Planet Q doesn't look all that rough in the shots we see from Leighton's windows. Though it seems the Leightons live outside the city limits. Benecia might be, since Spock claims their medical facilities are "primitive" in Turnabout Intruder, though apparently good enough to take care of Lenore in The Conscience of the King.