Well, maybe you right, because of his rank, Miles O'Brien can't command a cruiser type ship.
Correct.
But what about a Freighter? Let say, he ask Starfleet to give him a Freighter to command.
They're going to say, "You're an engineer, who's never taken command courses, you're not qualified but you can have any engineer's billet you want and qualify to command while there".
I think if an NCO like him can become the second in command of a small patrol vessel, then he can become the captain of a fishing boat and a Freighter, isn't he?
I suspect though I'm not certain that the XPO is typically a "command" specialist, rather than an engineer.
It's worth noting that while some cross-pollination between the command track and the engineer track in military service in some countries, this is rarely the case in civilian maritime service (they're two entirely distinct certifications) and is at least a three-step process in civilian aviation.
But because it is Miles O'Brien, an Engineering Nerd like Geordi, he is not satisfied with the ship. So he want into a ship graveyard, and found an old Galaxy Class Starship that no longer work, but the condition still better than the Ent-D. Then he canibalized another ships to repair the ship, and use the Galaxy-Freighter as his personal Freighter ship.
Yeah, even if he can get a "captain's billet" at all, the above scenario is piracy, grand theft and probably a fistful of other crimes.
And that's before getting into the fact that as I noted earlier, the certification requirements for commanding such a large vessel are almost different from commanding something like the Xhosa or a Raven-type, which would be different again from acting as the duty "pilot-in-command" of a runabout or similar support vessel.