Well, Kirk and Scotty did seem to agree that Kirk would have to part with an arm and a leg in order to get "his" ship back. Perhaps the price Admiral Nogura agreed to was Kirk giving up both the position of Chief of Starfleet Operations and the rank of Rear Admiral?
The USS Prometheus in Second Sight had a Lt. J.G. in command
So did the Enterprise
-D on a number of occasions, including "Arsenal of Freedom".