Why not?
People can be functional heroin addicts (same as functional alcoholics).
Not that it’s a good or desirable thing.
Most heroin overdoses come from cut drugs, or from using at similar level after a break, often caused by prison stints. Both direct consequences of them being illegal.