I wouldn’t expect a doctor to withhold your blood pressure or temperature or weight if you asked. Your pd is your business. But I suspect there might be a difference between an optometrist and an opthamologist. One is a doctor, and the other is in the business of selling glasses.
In Massachusetts, they apparently made it a law that eye care professionals have to give you your PD. Not sure where else, though.