Well, again, involuntary commitment for mental afflictions is a thing. So it has surely been a thing in the 20th and 21st century. Of course, you don't get commited on basis of a diagnosis alone (AFAIK), but I would expect a similar criteria of "a danger to themselves or others" to be set for drug abuse as has been set in that case.