How necessary or exaggerated is the following Anrede?
"Sehr geehrter Herr Prof. X" bzw. "Sehr geehrte Frau Dr. Z"
I mean, should I write Herr Prof. X, or is Prof. X enough?
Also, is it old-fashioned to write like this?
First, it is not correct to leave out the Herr or Frau. “Sehr geehrter Prof. X” sounds uncomplete.
It is possible to leave out the academic title (Prof., Dr.), but it depends heavily on the context whether it is advisable. Generally, the need for including the Prof. increases the older and the more conservative the recipient is, the more hierarchical their field of study (think medicine), and the more distant your relationship to them is.
There are professors that want to be addressed “Herr Professor Doktor X” at all times, even when spoken to. There are others that would consider this exaggerated.
If in doubt when writing, do include the title; it is safer. At a personal encounter, listen to what other people with a similar status use. (“Similar status“ because it is common that professors that expect the title from common people are OK to be addressed without it by fellow professors.)
According to what my teacher told me,
Sehr geehrter Herr should be there followed by the name. You should only use Prof. if the person himself referred to his own name with the academic title(In other words, if you have evidence that the person prefers that he be called with the academic title).