The exception was in theater classes, and perhaps in a couple of other instances of long acquaintance. It just seems reasonable to default to the safer, more formal option. I believe in some places (Europe?) the preferred title would be "professor" instead of "doctor," and I agree that that is more conceptually reasonable outside of medicine.
> Asking that the title be used explicitly just smells like insecurity, and wouldn't reflect well.
The professor in question is teaching electrical engineering students. If they're anything like the EE students I know, this is almost certainly not the only time during class someone will have to politely but firmly remind these students to color inside societal lines. :)