Flatulence and burping could possibly be viewed within a cultural context. I think if you are in a culture that frowns upon passing gas, then you should probably follow the norms of that culture. On the other hand, if one passes gas accidently, people are adult enough to deal with that without making a big deal about it.
I do believe that you could be causing some type of injury to yourself by tensing your abdominal muscles, however, especially when you take ukemi and that is my concern. I would suggest that you follow the advice previously given that you should either not eat, or if you must, then have something very light (like a BLT sandwich) to tide you over and even then not right before class.