Can a doctor's prescription be obtained for over-the-counter codeine? Yes, it is possible to purchase codeine over the counter in some states. In general, doctors will write prescriptions for any Schedule II opioid that they feel is appropriate for their patient's needs.