Perry had been undergoing ketamine infusion therapy prior to his death, reportedly for depression and anxiety. The toxicology report adds: “At the high levels of ketamine found in his postmortem blood specimens, the main lethal effects would be from both cardiovascular overstimulation and respiratory depression.”
He was getting it as treatment, but technically yes
He was definately taking it recreationally too, a therapeudic dose wouldn't even be close to enough to OD on. Long term ketamine use can have it's own risks if the dose isn't kept very low.