My grandson was constipated and his belly would extend if he didn't have a bowel movement but he didn't have gas. When you say bloat, do you mean that he also passes gas? IF he's not passing gas then his condition is unlikely to be lactose intolerance. I don't know about gluten.
My grandson did have to not have dairy because dairy is constipating.
If he's lactose intolerant he will have gas and bloat unless you completely eliminate dairy. I suggest you be consistent about it for a couple of weeks and see if that helps. Gas is always presence with lactose intolerance.
Gluten intolerance has become a common subject now a days. I suggest you do a trial without wheat. You have to be consistent for a couple of weeks for either trial to work.
You can do a trial without learning about everything that contains dairy and wheat. Be just eliminating the obvious you should see some improvement if intolerance is the issue. Dairy is anything made with milk. That ones easy. Gluten is anything made with wheat. But some grains also contain gluten. Oatmeal is one. Look up a list to go by but don't worry about the obscure.