For example:
A professor said that he loves teaching.
Is it possible for "he" to refer to "a professor"?
For example:
A professor said that he loves teaching.
Is it possible for "he" to refer to "a professor"?
There is absolutely nothing wrong with that sentence. A personal pronoun (e.g. he, they, she, etc) can refer to a proper noun denoting a person, (e.g. John Smith, Mary Patel) or a non-specific one (a professor, my mother, the children, a manager, the chef). John Smith said that he likes beer. My mother said that she was tired. The children said that they wanted ice-cream. Mr Jones says he is thirsty. If a customer wants to speak to a manager, they (or "he or she") can phone after 10 o’clock. Peter complained to the chef about the meal. She wasn’t very helpful.
If a pronoun of definite gender appears in the same context as a noun of indefinite gender, without any change of context in-between, you can safely assume the pronoun refers back to the noun. Otherwise this would be very confusing to English speakers.
Examples:
The doctor calmly walked into the operating room. "Is the patient sedated?" she (the doctor) asked the anesthesiologist. "Yes, doctor," he (the anesthesiologist) replied.
Although the senator repeatedly ran and was elected on a campaign of devout religious principle and scrupulous moral virtue, after his (the senator's) death, it was revealed he had as many as four illegitimate children.