Yes, that agrees with the addiction theory of Johann Hari, who has a TED talk and a book[0]. Experiments with rats show a rat will quickly be addicted when the choice is only between water and an opiate. But give the rat something other than a stark lonely existence, like exercise and sexual partners and rat friends, and they hardly use the drug. Similarly, many US servicemen in Vietnam became addicted to heroin while in country, but almost all simply stopped heroin when they were back home around friends and family.
If anyone wants to read a really great book about this topic i suggest "Chasing the Scream"[1]. This book made me think about drug addiction in a completely different way and also change my mind about legalization -- of all drugs, including heroin.
[0] Chasing the Scream: The First and Last Days of the War on Drugs https://www.amazon.com/Chasing-Scream-Opposite-Addiction-Con...