Women who gave birth to two or more children had a 50% associated increase in aggressive ER-/PR- cancer, but the association was not found when the women had breastfed. Other studies have also found an association between breastfeeding and decreased cancer risk.
The results were “strikingly different” when researchers compared the number of births and breastfeeding among women with hormone receptor positive cancers. Women who had two or more children had lower associations of ER+/PR+ cancers, and breastfeeding didn’t change that association.
It's tempting to believe that this is true, and it would comport with the paleolithic model, but there are so many confounding factors that I doubt the researchers have identified them all - which is why these types of studies cannot be used to prove causation. Intervention studies on these populations are problematic for several reasons.
Best anyone can say from this is if you can breast feed a baby, there are many reasons why you should.