I’ve never thought about this and so had to look up exactly what the Church’s position on drug use was. Here’s what I could find in the CCC:
“2291 The use of drugs inflicts very grave damage on human health and life. Their use, except on strictly therapeutic grounds, is a grave offense. Clandestine production of and trafficking in drugs are scandalous practices. They constitute direct co-operation in evil, since they encourage people to practices gravely contrary to the moral law.”
It seems, then, that while needle exchange is not in itself evil, it would be like handing out condoms to homosexuals. Condom use by homosexuals is not in itself evil, but a Church promotion of it would be tantamount to encouraging sin. Encouraging sinners to practice their sins more safely is still encouraging sin. The Church is not, and should not be, a medical organization. She is concerned for our moral health and should present the truth without compromise.
That said, it’s my opinion that a Catholic doctor treating a homosexual patient or drug addict unwilling to change could present the medical benefits of condom use or clean needle use without committing a moral error, as long as they also present the greater medical benefits of abstinence and detoxification. Also, they shouldn’t tell a patient that they should be using condoms or clean needles, as this implies that their behavior is all right and it is only their lack of safety precautions that is the problem, nor should a Catholic be involved in handing out condoms to anyone or clean needles to drug addicts. Merely presenting medical information and leaving the choice up to the patient seems within the realm of the medical profession, without compromising moral beliefs.
Of course, all of the above is my opinion. I think it’s in line with the teaching of the Catholic Church, but if anyone has evidence that the Church says otherwise, I’m open to it.