If the example had appeared in a text where a dermatologist was mentioned previously, the article would be essential. For example:
I went to see a dermatologist. The dermatologist, Dr Miller, looked me over from head to toe.
In the absence of such a context, "dermatologist" could be used as a title. But unlike "Doctor" it is not commonly so used. Therefore "Dermatologist Dr Miller looked me over head to toe." seems awkward and unnatural. The sentence could be recast to use an indefinite article:
Dr Miller, a dermatologist, looked me over from head to toe.
or the specialty could be left out:
Dr Miller looked me over from head to toe.
In the second example in the question "student" is petty much never used as a title, and so "Student Sarah was awarded for her efforts. sounds simply wrong to me. It could bwe recast as:
Sarah got an award for her efforts as a student.
Sarah got an award for her efforts in the class.
"was awarded" is not a usual phrase. If an actual award was given to Sarah, one would say that she "got an award", "received and award", "earned an award", or "was given an award". If people spoke positively about her but there was no formal award, the verb "praised" might be used, or "complimented"
The sentence from the question: "The student, Sarah, was the best in class." might be better rephrased as simply:
Sarah, was the best student in class.
unless there had been previews context referring to a student, such as:
I had to write a profile of a student. The student, Sarah, was the best in class.
In all of these "the best in the class" would probably be an improvement, again depending on the surrounding context.