I agree with ERdoc here. Context is everything.
In a university setting, professor and doctor are often used interchangeably, but often are inaccurate. When I teach, some of my new students call me professor, although I only have a Master's degree. I always explain I prefer my first name to be used.
Should a PhD run around a hospital and refer to themselves as doctor? No, for obvious reasons.
If someone on a plane calls for a doctor, do you think the guy with a PhD in communications should step up for the medical emergency?
I always address MD's as doctors- unless I know them well, or have worked along side them. One of our medical directors always introduces himself as Bob to every new EMS worker, but until you get to know him, most folks do call him doctor.
In mixed settings, ie with patients and/or family members present, regardless of how well I know them, I always use the title "doctor" out of respect to them and their position.
I figure these folks earned the right to at least that level of respect.