Would it be fine to take antacid medication if I have an e. Coli infection?

Yes. It may depend on the medication you are taking. It would be useful to check with your pharmacist, if the ant-acid may alter the effectiveness of the antibiotic.