If you have e. Coli diarrhea, can you pass it to your baby through breastfeeding?

No. Breast feeding is safe while you are having diarrhea. As a caveat, pay extra attention to proper hand hygiene.
No. The germs of diarrhea remain within the walls of your intestine. They live and multiply within that area, and never enter your blood, which is what it would need to do to pass to baby through the breast milk.