Starfleet clearly has "command track" and "non-command track" officers, but, other than specifically designated first and second officers, there's no evidence of having line officers in the traditional sense. Lacking line officer rules, LaForge and even Doctor Crusher (who eventually became a captain in the "All Good Things" timeline) may automatically be considered by Starfleet as experienced enough to become executive officers or even to command ships (under the right circumstances) based solely upon their ranks.
And note that Crusher was captain of a medical ship. It suggests that Starfleet would favor giving command of a specialized ship to someone whose training was in that specialty (like giving Scotty or Geordi or Gomez or al-Khalid command of an SCE ship), rather than going solely by whether someone is on "command track" or not. Which fits with Roddenberry's view of Starfleet as an only loosely military organization where rank was treated more as a part of one's job description than a component of a rigid hierarchical authority structure.