In the real Navy, you can command a vessel at the rank of Lt. Commander. It'll be a smaller, likely older vessel but it's still a command. It's the higher class of ship that require higher-ranks (Aircraft Carriers, for example).
It's probably the same with Trek. Smaller Cruisers/Destroyers/Frigates will likely have Commanders as COs with the Heavier Cruisers and the "Battleships" (Galaxy-Class and Sovereigns in the TNG era, Constitutions and Excelsiors in the TOS era) commanded by Captains.