Yes, you can buy pretty much whatever you want in a Tijuana pharmacy. They may even offer to inject injectable drugs for you.
There are also doctor offices in the tourist areas that will write prescriptions for a very reasonable fee if you would be more comfortable having some paperwork.
I get all my meds from All Day Chemist, based in India. The shipping is $25, although they sometimes run free shipping specials. Just one of my medications costs $150 for a month. ADC has it for $4.
They don’t sell narcotics, but they do sell what you were inquiring about. You don’t need a prescription.
Both of those medications are $4 prescriptions at most major pharmacies (Target, Walmart, etc)
Is the issue you just don’t have a prescription? Can you call your last doctor and ask him to refill it at one of the cheapo pharmacies? If you explain to him/her that you are temporarily out of insurance, I’d be surprised if they didn’t refill them. They’re both fairly common & benign drugs/