Yes. The pharmacist almost certainly knows much more about drugs in general than a doctor does. The doctor is familiar with the drugs he prescribes, sure, but may not be at all familiar with the drugs that your other doctor prescribed. That is, your dermatologist knows all about dermatology drugs, but may not know much about your blood pressure or antidepressant medicine (in particular, that one of those drugs has a bad interaction with the dermatology medicine he's prescribing).
That's also why it's important to always go to the same pharmacy if you can. If you switch to a new one, make sure to switch all your prescriptions at the same time.