Much like us, every once in a while fish will do things that are out of the ordinary. Scratch, Yawn, I'm pretty sure I've seen my gourami hiccup, and that includes vomit. Something probably just got stuck or otherwise didn't agree with the fish.
The big question is whether this is a one time thing, or a constant thing. If it happens all the time, then something is clearly wrong.