Absolutely not always. Yes, there are MRI with permanent magnets, but these are huge and only reach up to 0.4 Tesla. Electromagnets are the standard today:
"Helium cooled superconducting magnets are the most common type found in MRI scanners today." - https://en.m.wikipedia.org/wiki/Physics_of_magnetic_resonance_imaging
Lol