I agree with the last post. Working with children has always and will always make you more susceptible to getting their illnesses, just as they get each others. It's common for a child to vomit his undigested meal. It sounds like you and maybe your teacher friend are a little naive when it comes to children, and how things are in a group setting and illnesses. Educate yourself, and help by teaching your class good health habits. Remind them to cover their mouths when coughing and sneezing, etc. I hope you were very understanding of this poor child getting sick, I'm sure it was scary for him.
If the child had an intestinal virus or bacteria, it would have to go quite the circuitous route to get into your your digestive tract, because airborne germs applies more to sneezing and coughing from colds. Some viruses and bacteria do go thru spit, so since kids can't help getting their spit all over the place, just don't touch your face during classes, rather use a piece of kleenex if you have to scratch or wipe your eyes or nose, and wash your hands before lunchtime and at the end of the school day.
When things like this happen with children, try to keep in mind that if you follow a healthy lifestyle and wash your hands with frequency, you are less likely to get sick. But at the same time, if you will be working with preschool children for any length of time, you're gonna get sick occasionally from what they got no matter what preventative measures you take.
It is useful to think thru the worst-case scenario. The scenario is you might feel nausea for a few days, you might throw up one night, and that's it. I mean, it's not like you're going to get the plague or something. Kids and vomiting follows like the night the day, so just notice how you do NOT get sick this time, and remind yourself of it next time a child shows signs of illness, and that should keep you from worrying so much.