Breastfeeding can keep you from ovulating, but it’s not a good idea to rely solely on breastfeeding to prevent pregnancy.