At least in the case of WCP, Drake may not be of a higher rank than Blair, but her positional authority, as the CAG, is higher than Blair's, who's pretty much only aboard the Midway as an observer.
We see an example of this in the first part of End Run, where the LT in command of the Johnny Greene is within his rights to order the LCDR that was with them for the recon on Vukar Tag to stay in her quarters until the actual recon part of the mission, after her giving the order to go all-out with the unbalanced engines.
Granted, in general, if the higher-ranked officer wanted to make a stink about it, the JO who happens to be in a position of authority over that higher-ranked officer had better have a good reason for their action.