I don't know about that.... but if a child has had antibiotics etc. this can discolor teeth as well.
As far as his cavities... remember that eating sugar does not cause cavities per say... .it is a certain kind of bacteria that causes cavities...some people have this naturally occurring in their mouths more than others, and are thus more susceptible to cavities than others... thus, dentists say don't share toothbrushes etc., because you can "transfer" these bacteria to other people. When people eat, foods naturally breakdown into sugars...and it is the decomposing foods in the mouth that "feeds" these cavity bacteria.... thus, brushing and keeping the mouth clean is important. Some people can eat all the candy they want and not get problems with cavities... others will get problems with cavities. It depends if they have this bacteria in their mouths. Also, if a child's teeth is very close together... cavities can occur in between the teeth because it's hard to clean in between the teeth... a toothbrush does not reach there. Thus, flossing is important. This happened with my daughter... that is how I learned all this, from her Pediatric Dentist. My dentist said it's not her fault that she had like 3 cavities already...they were all located in between her teeth & her teeth are all very close together. So she has to be even more diligent in flossing between her teeth.
Anyway... I never heard of some dental work "causing" discolored teeth.... perhaps get a second opinion??? Perhaps do a google search on the topic and see what comes up? I really don't know... but it sounds curious. It would be interesting to see if this is true.
Take care and good luck,
~Susan