Previous job was in a university, and my current job is in clinical training.
There should be a breastfeeding policy @Nimnuan so I'd advise asking for it. Yes, there is a duty to accommodate breastfeeding mothers via reasonable adjustments. Usually, that means the ability to express and/or feed in private, take breaks to feed, and store milk. Students can bring their babies to campus to make feeding more convenient. However, if baby is not in university childcare, this means baby stays with the other parent, a family caregiver or paid childminder while the student goes into classes, but is nearby so they can feed during breaks, or step out of class if the other caregiver lets the student know baby needs feeding.
It doesn't extend to bringing a baby into scheduled teaching sessions, because that would not meet the definition of "reasonable" due to the potential impact on other students' learning. It is not discrimination against a breastfeeding mother as long as the provisions described above to accommodate feeding and storage are in place.
If you feel you can't be away from your baby while you attend university teaching sessions, then the only option open to you is deferring your studies until your child is a bit older and either weaned or no longer breastfeeding on demand, so they can stay with another caregiver for longer periods of time between feeds to allow you to attend your course.
I will say, in my previous university job, we had a student who thought they could get away with bringing a baby in. They didn't. They were sent home straight away and advised that a repeat would be a disciplinary issue. It's not fair on a baby either to be sat in a lecture theatre most of the day.