If he’s using it he probably just has a prescription or a doctor that provides it to him. Ketamine isn’t all that hard to get prescribed and it is, frankly, a pretty mellow drug.
Specifically ketamine is only a Schedule III controlled substance. Any physician can prescribe it to any patient and it's available through the normal pharmaceutical system. It's not one of those really dangerous, addictive Schedule I drugs like marijuana.
https://www.dea.gov/drug-information/drug-scheduling