It's not impossible I guess.
One very important factor determining similarities (and differences) between your planet and earth will be the time point at which the single celled organism came from earth to your planet.
If it was a very early bacterium (from when eukaryotes did not even exist, some billion years ago), then more complex lifeforms on your planet will have completely evolved to fit the habitat of that planet. They might still all be prokaryotes or multicellular - in any case they will be vastly different from life on earth. Still, just by random chance they could produce a chemical (which could be codein, but better make something up at this point) that affects humans.
The problem with this scenario is that it feels a bit forced, since - from a biological perspective - the lifeforms on the planet will really just randomly interact with human biology, as there is no reason to assume they produce similar bioactive compounds.
In the case that the single celled organism came from earth to your planet 'quite recently' (from an evolutionary perspective this may still be millions of years ago), then you might be dealing with a simple eukaryote. In contrast to bacteria eukaryotes share many common features, so its is far more likely that a substance that evolved or is used on your new planet also affects humans. While I wouldn't go for codein (which as an opiate is probably only produced by higher plants and not single celled organisms), it's not unlikely that the dominant life on your planet produces a compound that is negatively affecting to all other eukaryotes. Evolutionary this makes sense, as any species producing this compound will have a significant advantage over the other life forms carried over from earth.