That really sucks. Sorry to hear it.
A lot of the kids my sons are friends with are now dabbling with drugs and booze. Mostly pot, and also vaping (and I assume they are adding pot to the vape but who knows). And, of course, drinking when they can. It's frightening and most of the parents seem to be shrugging it off or ignoring/denying it. I can't tell if they are really that obtuse or they just don't know how to prevent it and denial or ignoring it is a defense mechanism. Not sure.
So far, my wife and I have been pretty lucky. My oldest really doesn't seem to have much interest. We know he's tried everything once, but he doesn't seem to like it. He and my wife have a really great relationship and he tells her everything (and, yes, I am jealous of that but am glad he will always talk to at least one of us). We trust him and have no reason to think he's lying (but perhaps we are ignoring it or just in denial). My youngest is a different story. He's 14 and we've already caught him smoking pot twice and vaping several times. No drinking yet. I've told both my kids that if they want a drink they can ask me and I'll give them some. Both have tried beer (didn't like it at all) and my youngest tried bourbon (he took a sip, said it was great, and was done). I'm hoping that helps.
It's scare stuff, though. And, there is no easy answer to it. A lot of these kids think they are invincible and immortal. Addiction and death from overdose is something that happens to other people, but never them. They are convinced their lives will still turn out fine and they can one day just walk away from this. And, most of them will. But, not all.
My best friend in highschool used to get high a lot. He had little ambition, barely got through college and had trouble holding a job most of his life. He died of a drug overdose - while in rehab no less - about 6 months before his 40th birthday. He and I had lost touch over the years, partly because I went on to do things with his life and he just never did. It didn't bother me but as time went on he just shut me out of his life. At the time he died I was trying to get in touch with him and see how he was doing. Imagine my shock when I found out. It was awful. I went home for the first time in years (my parents had moved away at some point and I no longer had reason to go back to the town I grew up) and went to pay my respects to his parents and sister. Met his wife, his kids ... it was a really tough day.
Drug addiction is a horrible disease. I hope your son's friend manages to beat it but, honestly, the odds are not good. Heroin, especially, is a MOFO. I know a lot of addicts and recovering alcoholics and I see a number of people celebrate their sobriety every year. And, my observation is that the people who had heroin issues are the least likely to make it. They get clean for a while, maybe a couple of years, but the failure rate for sobriety is low. The failure rates for staying sober in general are low, but it seems to be especially bad for heroin.