I think your doctor is being cautious.
I'm guessing you haven't been pregnant while nursing before so you can't be certain about how your body will react.
Also, as a mom who nursed both of my babies, I would be concerned about getting into a situation where the older baby would be in competition for the boob with the newborn.
The newborn comes first.
Your newborn needs the colostrum you produce before your milk actually comes in. If you're actively nursing beyond a certain point, does your body have a chance to produce that?
I'm no expert. I would follow your doctor's advice because I believe that the child in your womb is completely helpless and deserves the very best start, just as your other babies were afforded.
Call the OB department at the hospital you plan to give birth at and ask them for a referral to a lactation specialist. I used to work in the OB department at a hospital and those women are awesome!
They're obviously pro-breastfeeding and they know how women's bodies work. They will help you take into consideration that you're growing a new life that you have to nurture while currently nursing an 8 month old.
I think it would be worth it to ask their advice.
Your 8 month old has been given the very best start. Your doctor has suggested you begin weaning. I don't think that's a crazy suggestion at all, but I've never been in your shoes.
Like I said, you need to prepare your 8 month old for the addition of the new baby in more ways than one. It won't be easy juggling two babies, but when it comes to nursing, the newborn has to come first.
Just my opinion and best wishes.