So in conclusion then even in DS9 Starfleet doesn't (and why would it) operate exactly like the current US Navy.The point I was making was that in DS9 we do have ships commanded by officers lower than Captain.
But if you want to trot out the "Starfleet is not exactly like the US Navy" argument, it's hard to think that way when Starfleet ships have the USS prefix in their name.
Which clears up your initial confusion why Starfleet rank structures don't appear to conform to 20th century US Navy conventions.