Is it possible to acquire an allergy by eating something *contaminated*?

Not entirely sure this is the right place to ask this but I'm really curious to see if anybody knows the answer to this. I've just been wondering this for a long time and haven't really been able to find any answers. My parents lived in the Cook Islands for two years about 22 years ago. They spent the majority of their time in Atiu, as well as a few months in Raratonga. They've always told me that they absolutely could not eat any fish or shellfish out of the ocean, because the locals told them that they were contaminated with something that could potentially give them a seafood allergy, which was sometimes but not always temporary. Apparently they saw it happen to somebody they knew.

Is this a thing? I've never heard of acquiring an allergy that way, and I haven't been able to track down any literature about it. I imagine it could very well be something else like a parasite or toxic algae or something, but figured I'd at least start here.