The BMA in Scotland pointed to the example of the island of Cumbrae, which lost its dispensing service after a new community pharmacy was given the go-ahead.
Its GPs later quit and the health board, NHS Ayrshire and Arran, has been spending nearly £50,000 a month providing locums.
The Scottish Government's consultation on possible new controls on pharmacies in rural areas came to an end on Thursday and in its response, the BMA said it supported the proposals to protect dispensing practices in rural locations.
Dr Alan McDevitt, chairman of the BMA's Scottish General Practice Committee, said: "The flexibility to run dispensing services helps remote and rural practices to retain and attract GPs.
"It is also well established that where GP practices have dispensing services, they are able to support additional and enhanced services, fund increased levels of practice staff and in many areas allow dispensing practices to operate from more than one site.
"There are examples where the loss of dispensing for a GP practice has resulted in the loss of practitioners, practice staff and even, in some instances, surgeries.
"The recent loss of dispensing for a GP practice in NHS Ayrshire and Arran has led to the board having to operate an ad hoc locum arrangement to ensure that the local population have access to a GP ."