If your doctor prescribes Medical marijuana for you, that should have no effect on your SSDIB/SSI amount. It is no different than getting prescribed any other medication by your doctor.
If you are receiving any State assistance and there is random drug screening in order to maintain those benefits, then I would definitely speak to your case worker first.
Yes, you can receive a medical marijuana card. There are a number of doctors in California who will write you a recommendation for the card. I recommend using google and finding a convenient, local doctor to help you with that. Specify in your search that you're looking for a doctor who specializes in writing marijuana prescriptions. Beyond that, there is a state registration for medical marijuana, but those records (as far as I know) are not disclosed to the federal government. Regardless, your SS payments will not be affected by your choice of care.