A doctor can diagnose ailments and prescribe medication for patients, but since the doctor might not suffer from the same condition the doctor won’t need to take the medication prescribed.
Nor will the doctor prescribe the same medication for every patient as they might have different diseases or conditions. Even patients with a similar condition might react differently towards a particular medication or therapy. In this case the doctor will need to adjust the dosage or prescribe something different.
If the doctor also suffers from a medical condition then medication might be required, but even if the doctor recovers through use of a particular medication, it doesn't mean that this medication will be suitable for all other patients.
This is similar to the case of yoga students and a yoga teacher.
There is no need to look at others, not even our teachers, but concentrate on our own path and practice.