You said that you think the drug is a prescription strength vitamin B. If that is true, can't you just take an additional OTC vitamin supplement? I take a multivitamin and have taken additional vitamin B supplements in the past, B6 in particular, but not for memory. Ask your pharmacist if its active ingredient is vitamin B, and they probably have a recommendation, or you can ask your doctor to prescribe something that is or can be covered by your insurance.
Also, many drug companies have manufacturer cards to take a discount of of each refill (usually for about 12 refills) and you can get another after if you want to continue on it. I'm not sure if this applies to this drug, but there are also all sorts of drug programs that can discount prescriptions that aren't covered by your regular insurance. I take prescription strength folic acid, which my insurance doesn't cover, so I use a generic prescription discount program I found either online or in a magazine. I brought in several, and my pharmacist checked to see which would make it cheapest.