I used to not have dreams of this nature, but recently have experienced some. Sometimes they're silly dreams, where I'm very aware that they are dreams...such as one in which I dreamed I had a portal gun and each time I went through a portal into a new area, I'd feel the effects of a different drug (I only remember MDMA and LSD specifically, but there were a few more).
Other times, though, I'll experience much more realistic dreams. Like the other day, I woke up after only a few hours of being asleep and was trying to go back to sleep...my consciousness then somehow turned this into a dream where I felt sick and thought I had a fever before I "realized" I had eaten some shrooms! Once I realized I had done so, the dream turned really trippy, but in a good way. I remember closing my eyes in the dream and having really vivid, colorful CEVs like never before, and talking to my boyfriend who was also tripping on shrooms, and the world's colors suddenly being strange (tree trunks were purple, and leaves were red, instead of brown and green). All kinds of fun, but super trippy, things.
Craziest thing is that I woke up almost entirely convinced that I had -actually- eaten shrooms, until I realized it was all a dream and I've never even seen a dose of shrooms in my life. However, I've never dreamed of doing something like opiates or dissociatives or other things that I find I have no interest in or undesirable...my shroom dream seemed to consist of ideas I have on them from trip reports I have read, as well as a basis in LSD trips and candy-flips I have taken...
There's a lot of speculation that dreams are our brains' reactions to neural impulses that occur during the REM cycle of sleep - that the brain projects images in our minds to make these impulses make sense. (Such as impulses which make our brain think we are moving in a swimming motion cause us to to dream of swimming, for example.) I'm really bad at explaining it, but a lot of the time it seems our brain uses past experience as a basis for projecting these images...so someone who has experience tripping is going to be more likely to dream of tripping.
But there's also the possibility if you've just been thinking about the possibility of doing a drug and it's weighing heavily on your mind, that your brain projects what it thinks the experience would be like based on information you have collected previously? It's really a mystery, but I don't think dreaming of doing drugs is uncommon or a necessarily a sign of bad things for those of us who do. I always feel that dreams are trips of their own variety, though, and am one of those happy few (?) who experiences the privilege of dreaming, and remembering her dreams, multiple times almost every night. (Well, now, at least. It was a lot less common when I wasn't able to sleep at all, but when I sleep, I dream. And 9 times out of 10, I'll remember those dreams.)