I am so sorry you are having this concern with your baby. It can be so scary when a baby does not gain as expected. And it’s really hard when your doctor makes suggestions you may not be comfortable with.
Can you seek a second medical opinion? See an IBCLC?
Just to add to mommals thoughts-
Here is some more general info that you can find in The Womanly Art of Breastfeeding, Kellymom.com, The Academy of Breastfeeding Medicine, and this website.
If a breastfed baby is not gaining due to feeding issues, it is commonly due to baby not getting enough breastmilk overall for some reason. (baby not nursing frequently enough, low milk production, baby with latch/milk transfer problems.) Also, it is possible a baby may not be gaining well due to an underlying medical condition. Very rarely, slow weight gain is due to allergies from foods in the mother’s diet, and even then, the baby should still be breastfed while the mother tries some balanced and systematic food eliminations, according to the Academy of Breastfeeding Medicine. After all, unlike breastmilk, most formulas are almost entirely made of the two most common food allergens (dairy or soy.)
While your experience with your older kids may vary, overall, up until about 6 weeks, babies typically need to nurse a minimum of 10-12 times a day to get enough. After that, some babies nurse a bit less than that and get enough, but many still require frequent feeds. Even at several months old, many breastfed babies nurse at least 10 times a day.
Some babies prefer longer feeds, some shorter, most do a combo. Usually there is no problem letting a baby nurse as long or short a time as baby wants, assuming baby is capable of nursing effectively (transferring milk.) There is no evidence I am aware of that nursing a baby more often is going to hurt anything, ever. And advice to limit nursing duration or frequency due to some ‘too little hindmilk’ concern simply makes no sense. Spaced out feedings would work to increase the amount of foremilk baby gets, and thus lessen the amount of hindmilk.
But the idea that a baby cannot gain well if they get 'too little' hindmilk is incorrect already. All breastmilk has fat and calories-quite a bit.