A couple of years ago, I had a similar problem, owing to a bout with colitis. It really put a crimp in my ability to take classes. Fortunately, the colitis cleared up on its own.
If you know that your underlying problem is leaky gut, then it stands to reason that you are under a doctor's care. You should consult your doctor for anti-flatus treatments.
The only other suggestion I have is one that I employed back when I had colitis - wear a full-bottom dancebelt. If you are accustomed to wearing a thong leotard for class, switch to tights or a unitard instead, and see if this makes a difference.
Good luck.
[/i]