It is possible but it would be rare for an officer to be assigned as second-in-command of a unit with more senior officers attached.
The LCdr at navigation while Lt Leslie sits in the big chair in "The Alternative Factor" pretty much says it all: Nobody was paying too close attention.
All the senior briefings are pretty light on senior officers! If you look at a 1960s US Navy cruiser, which we might assume would be useful as a TOS model, you will generally find:
- 1 Capt CO
- 1 Cdr XO
- 1 Cdr Ops department head
- 5 LCdr department heads:
- Engineering
- Gunnery/Weapons
- Navigation
- Medical
- Supply
- 2 to 5 LCdrs as assistant department heads, chaplain and/or dentist.
- 12-15 lieutenants in various departments.
- A Marine captain (under the Weapons Officer).
And of course a passel of JGs, ensigns and warrants. And a Marine lieutenant.
There may be a few over- or under-fills in the departments, for instance the Navigator might be a lieutenant because it was a small department. In WW2 and the '50s there will probably be several extra Cdrs and LCdrs because the expanded WW2 navy opened more slots for promotion.
A major difference is that these cruisers would have a complement of 1100-1200, or as many as 1600 for the big Des Moines class. Would
Enterprise need that many senior officers for 430 crew? OTOH,
Enterprise is lousy with full lieutenants, which might argue for more LCdrs and Cdrs.