No rules against having magnets in wheels or tracks, or even the bottom plate of a machine.
It's been done a few times.