According to dictionary.com. "chemist" is used in the UK as a synonym for "pharmacist".
I have prescriptions dispensed at a chemist('s), but only permitted when the pharmacist is there.
A chemist (person) can be involved in many other things than medicine, e.g. development of new fuels, while a pharmacist/pharmacy to my mind is purely concerned with medicine. At the same time, a chemist (shop) can sell many other things, some not even to do with personal health and cleanliness. Think Boots and their wide range!