I am breastfeeding and I ate food that gave me a loose stool? Should I dump my pumped breastmilk?

No. Chances are you just had some GI upset and not even a true infection. If you had infection it is spread by stool contamination not in milk. Good hand washing will prevent the spread of the virus.
No. No you don't have to pump and dump. Just wash your hands thoroughly when handling the breast milk.
No. The fact that you ate food that gave you loose stool does not mean breastfeeding will give the baby loose stool or GI upset. And if your loose stool was due to a viral or bacterial infection, the baby will get antibodies to fight off the infection from your breast milk.
No. Whatever you ate that gave you loose stool should not affect your breastmilk. You should continue to breastfeed.