FoodSafety.gov describes contamination as one cause of foodborne illness alongside bacteria, viruses, and parasites.
Rubber fragments from worn seals or gaskets are a physical contaminant. They can pose a choking or injury risk.
If you find rubber in food, stop eating it and keep the package if safe to do so.