From "The Doomsday Machine":
KIRK: Matt. Matt, listen to me. You can't throw your life away like this. Matt, you're a starship commander. That makes you a valuable commodity.
From "The Ultimate Computer":
SPOCK: Commodore Wesley is a dedicated commander. I should regret serving aboard the instrument of his death.
Spock didn't say "dedicated officer" but "dedicated commander" which could be the same context as in "The Doomsday Machine". i.e. "[starship] commander" (since a commodore
obviously is not just a starship captain
but in both cases the commander of a starship).
It's also interesting that the reply to Wesley's request for permission to destroy the Enterprise is not asking Commodore Wesley for acknowledgement but "Lexington".
IIRC the Star Trek 9
novelization of James Blish featured the early script for "The Ultimate Computer". In that case there is probably information useful for this debate?