Can't tell without a picture, but I think what you saw may have been his tongue? They sometimes will stick their tongue out a bit and open/close their mouth several times if they miss striking at a cricket and get dirt in their mouth.
If nothing's hanging out of his mouth, don't stress him by trying to open the mouth. Mine prolapsed her stomach once (actually ended up being fine with no medical intervention; I just stuck the broad end of some tongs in her mouth to keep her from biting the stomach until it went back in on its own in a couple minutes... apparently most cases don't end as well as hers did though). If the stomach is actually prolapsed, the frog will probably look kind of... idk, almost hollow on one side, and the stomach will probably be visible outside the mouth. Also there usually isn't a question about whether there's a problem; it's obvious something is very wrong.

For the bloating (if nothing is hanging out of the frog's mouth) you can put a few drops of honey in lukewarm water no higher than the frog's chin and let him soak in that for 15-20 minutes. That helps with water retention and impaction.
Also, if you could copy/paste the answers to the Trouble in the Enclosure sticky that would be helpful. Pictures of the frog and enclosure would be helpful as well.