That’s sort of a myth, that margarine contains things similar to plastic. But you could make plastic out of the vegetable oil that margarine contains. It would just be a different process.
That is close enough for me to have avoided margarine unless I’m eating dinner someplace else and there was no butter available...