It would appear you just ran into a misinformed clerk at that particular dispensary. All that is required by Calif state law is a recommendation from a doctor (written or verbal) but most dispensaries require written proof of the recommendation for their own protection from over-zealous law enforcement. They are operating a private business and can therefore refuse service to those without a written recommendation. Try a different dispensary or, if you must, request an explaination of the policy from the dispensary owner.

If your recommendation letter is from a licensed Medical Doctor in California you are protected from arrest under Prop 215.

hope this helped ,
Max Blast