Yes. It has various contra-indications, namely in patients with certain types of pacemakers, defibrillators and some implants or metallic objects.
Claustrophobics may not be able to do the exam (though new devices are designed to overcome this problem). Some patients may have to be sedated for NMR if absolutely necessary.
Patients with any of these conditions should inform the medical team before the exam.