It's possible in theory. Someone with unique skills can be directly commissioned at the O-4, O-5, or even O-6 ranks without ever being a junior officer. After commissioning they can eventually be promoted to O-7 (brigadier general or equivalent) just like any other officer.
https://talent.army.mil/direct-commissioning/