What is he doing?
Is he coughing/hacking constantly, or is it an occasional coughing episode?
Sometimes my cats will do a strange cough-thing, that is *not* related to herking-up a hairball. They will cough a very 'dry' sounding, but gentle, and sometimes rattling, kind of cough. Their head/neck will be extended, point of tongue sticking out, weaving their head from side to side and after a short time of coughing, will lick their lips a lot and swallow while sort of quickly extending their head/neck, almost like someone swallowing in a 'gulp' trying to get something down their throat.
When my cats do that, I think of it as maybe they got a loose hair tickling in there. Sometimes they *will* vomit up some stuff, if they had food in their belly and their coughing disturbed it ... but mostly it is just that dry cough, a couple licks and swallows and then they're good-to-go. I can sometimes offer a small bit of milk for them to lap up and it is usually enough of a distraction that by the time they lap up and swallow the first bit of liquid, it is enough to flush that stray hair down their throat and it will either come back up with its' friends as a hairball or exit at the other end.
If it is a hairball, it will either pass or come up. In order to do either, it has to fit through the openings and if it fits through the opening, it will fit through either the esophogus or the intestines. I have not heard of a cat requiring surgery to remove a hairball from the stomach, and as long as he is eating/drinking and behaving normally, I think I'd just keep an eye on him.
When my kitties start to do that dry-hair-cough-thing, I be sure to sweep/vacuum/clean more often and will brush them to remove loose hair before they groom it off themselves.