An MRI arthrogram
is preformed usually injecting gadolinium and iodinated contrast.
One could have allergy reaction to either. Pain after this study is rarely sever. Talk to doctor who did the study. Infection or blood in the joint could produce pain. Rather than taking a pain med do not overlook the possibility of an adverse reaction. If clear for adverse reaction any mild pain medicate is ok.