This has been a point of debate/discussion in the community for a while. But I think it's overthink-ed.
I think it's really safe to assume that the Queen just managed to lay it while hiding on the back of the dropship at some point. As a parasitic species like the Xeno would propagate as much as possible, so its not hard to believe the Queen could lay an egg or 2 with out her egg-sack. Or a Drone could've stuck the egg to the dropship while it was very briefly landed on the surface. Again, Xenos have been known to sneak aboard/around ships frequantly.
As for the egg's apparent location as seen in Alien 3, it was probably an oversight by the A3 filmmakers. As we know, A3 went through some real development hell, so it's easy to see how the continuity of it all could've been either overlooked or messed up. Either way, we really shouldn't look too much into the actual LOCATION of the egg as seen in the beginning of A3, and concentrate more on just the fact that there was an egg on the Sulaco in general.