Yep, it could appear as early as Steam Power if you built Iron Works right away. If you want to get all the way through the end of the tech tree without the sun ever appearing, you have to remember not to build any of the buildings that produce pollution, like research labs/airports, offshore platforms, commercial docks in PTW, etc. (And kill most of the AI, so they don't build hospitals/factories).
In one game, I milked to 2050 A.D., I would have had no pollution, but I forgot about Iron Works producing pollution, so I went ahead and built a hospital in one city that needed it, since the 'green milk' was already screwed up.