See the doctor, but MAKE SURE you get a referral to a physical therapist, assuming it's not a surgical issue.
A foam roller (and a foam ball, and a spiky inflatable ball, and a Stick...) is a good thing to have and use regularly regardless of whether that's your specific problem right now. Odds are that working out trigger points and adhesions will be pretty darn painful all by itself... but it'll prevent worse problems down the road. Roll first, stretch second.
Speed comes from what you put behind you. - Judi Ketteler