He wrote Perfect Day as a solo artist, so this would have been long after his experimentations with heroin, based on what I've gathered 2nd and 3rd hand. I think the association is so strong due to it playing through the iconic overdose scene in Trainspotting. Lou actually wrote a lot of genuine love songs in his later days with the Underground as well as in his solo career.
It is a melancholy, bittersweet love song, but that's just Lou, not necessarily anything (directly) to do with drugs. IMO there's no reason to assume he was thinking of heroin while writing this song. The fact that it is evocative of heroin use is perhaps coincidence, perhaps something more.
See now that is interesting because I've never seen that movie, but I guess it's not just me who can see the connection after all.
I agree with you though, it definitely fits into Lou's general theme, so it could just be a coincidence after all.