Even though it is not popular to be the 'rat,' a true friend knows when help is needed.
Confronting a friend about his/her drug problem is definitely a start. Hopefully your friend will listen and get help. Many times they won't.
Being associated with a person who abuses drugs is certainly not a good place to be. You can try to offer and get help for your friend, but then know your limits.