I have Irritable Bowel Syndrome and the symptoms you describe fits that diagnosis. I have read that children can have IBS tho it's not as common as it is with adults. My daughter thinks that her daughter has IBS because she has diarrhea and hard stools and complains of stomach discomfort. There isn't a test for IBS. It's diagnosed by the elimination of other disorders and the presence of certain symptoms.
I also have food allergies and am lactose intolerant. None of my food allergies cause those symptoms. I just feel nausaous or break out in hives or have an itchy mouth, throat, and/or ears. No vomiting, no gas, perhaps diarrhea.
Dairy products can cause the symptoms you describe. Lactose intolerance is not an allergy. With lactose intolerance our body lacks lactase(?) which is needed to digest the lactose.
Lactose intolerance is common. Milk allergies are less common. My granddaughter was diagnosed with a milk allergy when she was just a few months old. The pediatrician did blood testing and found that she was allergic to other foods also. My granddaughter is now 8 and has outgrown all of her allergies except to peanuts.
Allergies and lactose intolerance can take time to develop. His system may have been able to manage dairy until recently. I drank lots of milk growing up without having symptoms. My grandfather owned a dairy. I developed gas and diarrhea as an adult. Same for my father.
Science doesn't know what causes irritable bowel. It is a complex disorder. I found that I had severe diarrhea when I was under stress. When life was calm I had minor bouts of diarrhea. The diarrhea can be caused by food but can also be caused by other things, some of which are still unknown. Going back and forth between diarrhea and regular or hard stools is common with irritable bowel syndrome.
So is abdominal discomfort and/or pain. I have not thrown up with IBS. It could be a symptom. Children are much more sensitive and tend to throw up more often than adults.
My daughter who has had similar symptoms was finally diagnosed as being gluten intolerant by a naturopath. She's not had gluten for a couple of weeks now and says she does feel some better. At first she thought doing without gluten would be especially difficult. She found a gluten free section in the health food section of Fred Meyer and a couple of cookbooks with gluten free recipes and says it's not as difficult as she expected. She does have to plan ahead.
I recommend, because it's a simple thing to do, taking him off of ALL dairy products for at least 2 weeks and see if that makes a difference. No cheese, ice cream, yogurt, puddings, no milk on cereal etc. He can use rice milk instead. I would stay away from soy for now. Soy is a common allergen.
YOu could then test by taking him off of gluten which is found in wheat products.
I hiked in the Grand Canyon and came back with more abdominal pain and watery stools than usual. The doctor finally tested my stool and found that I had picked up a parasite.
Parasites are uncommon in populated areas. Maybe there are none at all. I don't remember. One has to have gone into the wilderness or a foreign country to get a parasite. We can pick up parasites when we camp. If your son has not had that type of exposure it's unlikely that he has parasites.
Worms can be found in the soil of a city. They usually have a third symptom of an itchy anus especially at night. The person infected with worms loses weight over a short period of time. Your son's symptoms do not sound like worms to me.
Finding a cause for your son's discomfort may take quite awhile. Hopefully he'll feel better before you go down the complicated road to find a diagnosis.