As far as I am seeing on Snopes and CBS News, this 7-Up ad was a real ad in the 1950’s.
NOTE! There is almost the same image circulating that claims to be about giving beer to infants. That is a FAKE ad. It looks virtually identical as this one, but replaces 7-Up with beer. Same baby etc.
There is also a “Soda Pop Board of America” fake ad, with the tagline, “For a Better Start in Life, Start Cola Earlier”. It also features a photo of a baby, but looks different from this. That ad is also FAKE -> Hoax Ad


But it’s titty milk so maybe it tastes different? Also, how does 7 Up know what breast milk and 7 Up even tastes like?
It might not’ve been though. There was big advertising push in the early/middle 1900’s to get infants off breastmilk and onto formula as the “modern” way.
Even today, there are large differences related to socioeconomic class, in how many parents use formula. Also varies a LOT per country.
Since the 80’s, there has been a renewed push for breastfeeding. Advertising has been curtailed, for example, https://en.wikipedia.org/wiki/International_Code_of_Marketing_of_Breast-milk_Substitutes