I think this is a misconception. It's not about the fountain vs canned or bottle soda.
Carbon dioxide lowers the pH of a drink to 4.5, which is acidic. The acid pH level erodes teeth and one shouldn't brush their teeth too soon after drinking soda because the enamel can be damaged. (Edit: acid on your teeth is always bad, brushing or not.)
Getting a soft drink from a fountain often means getting a straw for your cup as well. Using a straw to drink does help somewhat to bypass the soda from making contact with the teeth in the first place.
The pH of soft drinks is more typically in the range 2-4, due to the addition of various acids.
And the negative effect of soft drinks on dental health is primarily from the action of acid-producing bacteria metabolizing sugar. Diet drinks aren't nearly as bad for your teeth, carbonated water barely has any effect.
Carbon dioxide lowers the pH of a drink to 4.5, which is acidic. The acid pH level erodes teeth and one shouldn't brush their teeth too soon after drinking soda because the enamel can be damaged. (Edit: acid on your teeth is always bad, brushing or not.)
Getting a soft drink from a fountain often means getting a straw for your cup as well. Using a straw to drink does help somewhat to bypass the soda from making contact with the teeth in the first place.
Use a straw, save a tooth.