While it is generally safe to use -さん when taking to someone and the use of -先生 is appropriate for use in a school environment when talking to a teacher, would the use of -先生 carry over outside of the school environment if encounter the person under different circumstances?
For example, while the use of the honorifics is pretty obvious in a school environment, suppose the teacher of one of the classes starts to learn a new martial art where one of their students holds a higher rank within the art, how would this affect the use of honorifics?