You don't need to balance for ever on the rear wheel for this...
1° Prepare for the jump extension, with your good foot ready to kick on the pedal, and the body on the side of the gap.
2° Start kicking in your good pedal while aiming at your landing mark, pulling the bars in the direction of the gap to cross.
3° After a full extension sideways, pull the bike up in front of you to transfer it on the other side. Full brakes on touching the rear.
During take off, the bike nearly turns 90 degrees and leans towards the gap, but then, you pull it back beneath you to re-adjust it and land parallel to your initial position. Usually the rear wheel touches first, but if you push down on the bars, you can land both wheels at once for a better grip (on rocky areas). See this move in a video
This move is very different to the very small side hops that are used for repositioning the bike. Instead of just lifting the bike by some small bounces, you really need to kick in your good-foot pedal, end up on the rear wheel in full extension and carry on the jump by lifting the bike with you. The difficult part is if you must land parallel, without being dragged sideways afterward, by your inertia. You must counter-balance this by landing the bike inclinated towards the opposite direction of the move. That way, the inertia just brings you back in balance, with the bike straight.
Turning 90° or more
Actually in most cases, it is easier to turn 90° during the pedal kick, and land directly on the rear wheel, in the direction of the move. Most of the turn impulse takes place during take off, with the rear wheel still touching the ground. Turning 90° guarantees a stable landing, compared to landing sideways. It all depends on what's next. Most of the times, gripping both wheels firmly on the zone is a better option than fiddling around on the rear wheel.
Turn 180° and land to front-wheel
The tricky 180°
Now, another useless move, you can also launch a 180° turn while crossing a gap sideways. Rather than turn on your good side (opposite the pedal kick), try to turn on the same side as the driving pedal (you can use more of your momentum and weight shifting on the pedal kick to turn inside and this helps a lot). This makes a classy turn, and you can either nail it onto the front wheel like a gap to front-wheel or land on the rear wheel and try to carry on spinning (though it works best on a mod or short bike).