Hello from JustAnswer.
Yes, it is possible that someone with recurring cellulitiis of the foot could have an associated underlying osteomyelitis. There are many clinical factors that affect the relative risk of developing osteomyelitis, such as diabetes or previous trauma to the foot. However, if the doctor ordered an MRI because of these episodes of cellulitiis, it is likely that your doctor is concerned about the possibility of osteomyelitis.
Certainly, persistent pain can occur with osteomyelitis, but it is not the only condition that can do so. There are many other conditions that can cause foot pain that does not go away with treating the infection, the most often being degenerative arthritis.
If I can provide any additional information, please let me know.