In multi crew aircraft, which is pretty much every aircraft in the inventory except the CF-18, you start out as a First Officer (FO, which is always a pilot), I'm not sure about other communities but in MH it takes about 18 months to upgrade to Aircraft Captain (AC, again always a pilot) and 6 more months to upgrade to Crew Commander (CC, can be a pilot or a nav). By the time you upgrade to AC you're already a Capt, and in most cases it's 3 Capts and the AESOp on an MH. The AESOp is an NCM and can be anywhere in rank from Cpl to CWO. For the 6 months prior to upgrading to CC, it'll be the Nav that's the CC (I'm not sure if the FO can be the CC since everyone upgrades and just because you're qualified AC doesn't mean you'll be acting as AC). The Nav being the CC can cause a bit of a conflict of interest since it's the CC that calls for the torpedo to be dropped (he's responsible for the mission) but the AC is responsible for the aircraft so by default he's also responsible for what ever comes off the aircraft, namely the torpedo. So it's usually a very short time before you upgrade from AC to CC. If it ever occurred that an AC was a Lt and the FO was a Capt, crew position takes precedence, the ranks on our shoulders are a military thing, they don't have much meaning within an aircrew. CC is the boss, regardless of rank and whether or not he's a pilot. Quite often the CC is a Capt and the Nav in the back is a Maj. As for the jet jocks, an Lt can fly just like a Capt or any other rank as long as he's qualified. These little quirks are probably why the airforce doesn't put much stock in ranks since they don't mean jack in an aircraft.
Another point about pulling rank in an aircraft, even a lowly Lt can say "This is stupid, we shouldn't be doing this". We're a crew and pulling rank has led to crashes and fatalities in the past so it's very frowned upon. If there's a disagreement, we land then jack each other up but never in the aircraft.
Cheers