It is interesting that your medical practitioners are advising you otherwise. Mine said that it was no problem. I breastfed all the way through the 7th month of my pregnancy - until my daughter weaned herself off.
Mayo Clinic is a trusted source (non-profit medical practice & research group). The recommendation from there basically amounts to listen to your body. They do advise to consult your OB - if you have a history of pre-term labour or have a complicated pregnancy, you should consider weaning your child off.
Generally, it's possible to safely continue breast-feeding while
pregnant — as long as you're careful about eating a healthy diet and
diligently drinking plenty of fluids. There's an important caveat,
however. Breast-feeding can trigger mild uterine contractions.
Although these contractions aren't a concern during an uncomplicated
pregnancy, your health care provider may discourage breast-feeding
while pregnant if you have a history of preterm labor.
I found one study from 2003, Breastfeeding during pregnancy, with a small sample size (57 women), where the participants breastfed a child during pregnancy. The study claims that all children born to these women were healthy. The study discusses various reasons why the women weaned off their children, as well as children who weaned themselves off, and other women who continued to breastfeed the older child even after delivery.
A book to consult would be Adventures in Tandem Nursing: Breastfeeding During Pregnancy and Beyond; however, whether or not that is a biased source, is for you to decide.
Given that your OB knows more about you than any resource or study online, I would trust their medical expertise (as much as I personally disagree with what your OB is telling you). If you disagree with them or they are unable to back their opinion with studies, you should find one that is more up-to-date in their field and has experience in dealing with women who have breastfed their children during pregnancies. (You would need more nutrition, would be more fatigued, etc.)