"Turnabout Intruder" seems to confirm that line officers such as Captains cannot order an execution of one of their own no matter what, at least not in a time of peace. Admirals and wartime might be a different matter. And of course our Trek heroes are frequently placed in situations where "one of their own" suddenly and perhaps involuntarily becomes "one of them" instead, and has to be killed. Few of our heroes have had any qualms about killing people when they wear the wrong kind of uniform, and regulations seem to give them every chance to use summary judgement.
Timo Saloniemi