It makes no difference when learning to balance on a dirt bike or a bicycle - all the same skills apply.
You do have a big difference in weight. Make that a huge difference in weight and something a rider must learn to handle when successfully balancing on a dirt bike.
Of course you need strength, one of many reasons you don't pop a child atop a 450, but if you notice most pros don't exude bulging muscles and, in fact, struggle a bit when trying to lift their dirt bike back on two wheels after a crash. Balancing on a dirt bike involves the fine art of technique much more than brawn.
At any rate, if you don't know how to maintain balance on a bicycle don't master your stabilization footing on a dirt bike. Don't bite off more than you can chew. Start small and build your way towards slowly developing the skills necessary to steadying yourself on the 2-stroke or 4s-trike ride of your choice.
Nonetheless, if you know how to effectively ride a bicycle don't think that means taking up dirt bike riding will come easy. But you do have the fundamentals down so now let's improve on them.
How to Improve Dirt Bike Balance
1. Stand Up
When riding remain standing. Stand on the foot pegs the on the track or trail which means slowing down. You can't corner while standing at a fast rate but it helps you gain proper control of the dirt bike which eventually translates to the sitting position when required. That old saying "you have to go slower to go faster" certainly applies here.
And when we say stand up we mean the entire length of the Moto or wherever you ride. Ruts give pro riders the fits and sitting when navigating through them comes naturally especially at high speeds. Slow down, remain standing and work your way through the ruts. Jumps too, and wherever the ground takes you.
Pro's Tip: When standing on the foot pegs point your toes in a little. This brings your knees in closer to the dirt bike allowing you to squeeze and hold on with proper technique easier.
You might feel safer in a sitting position especially when riding over rough terrain but standing on the foot pegs gives you more control over the dirt bike because it puts so much of your weight on a lower point of the bike. If standing makes you feel out of control then slow down until you feel in control.
2. Keep Feet on Pegs
Practice keeping your feet on the pegs at all times. Perhaps you have seen some of those cool cornering shots of the pros with their corner-side leg sticking straight out. They know how to balance, you don't. So keep your feet on the pegs as you corner and slow your normal pace. Same rule applies anywhere else on the track. If you hit some gnarly ruts fight the instinct to drop your feet. Keep them on the pegs, slow down and work your way through the ruts.
Learning to keep your feet on the pegs develops muscle memory and forces you to grip the bike with your knees, i.e. proper technique, reducing your chances of arm pump and losing your balance.
3. Go for a Bike Ride
You learned the basics on a pedal bike now hone your skills by starting from the beginning. But skip the road bikes. Grab a mountain bike and hit some terrain. Nothing says Moto minus the dirt bike than hitting the trails on a mountain bike. You won't go as fast (exactly what you want) and if you have spent some time on a dirt bike you might find your bike riding skills on the upswing.
4. Use a Balance Board
A balance board mirrors the back-and-forth you get on a dirt bike. Of course, you won't get the speed or weight of a dirt bike, but you train your brain and body to learn and manage the jostling and jerking that comes on a dirt bike.
5. Find a Trainer
If you consistently spend more time in the dirt than on the bike or cannot get out of your comfort zone enough to remain standing on the foot pegs, then find a trainer who can help guide you through the process.
A key element to successfully riding a dirt bike comes from your ability to balance effectively and handle the bike throughout varying terrain and obstacles.
It sounds cliché but practice makes perfect. No one ever started out the gate knowing how to grab the holeshot. Learning, then honing the basics, and building on them trains your muscles and memory to ride a dirt bike successfully. Figuring out how to balance proficiently on a dirt bike represents just one part of the process.