hmmmm. sounds simple. after reading thru this thread, i have some ideas.
my first and simplest idea to check are the bulbs, their sockets, and electrical connectors. it sounds to me more like a resistance somewhere rather than a ground issue. make sure every one of those connectors is clean, shiny, and brass colored (unless it has silver colored connectors).
also make sure the connectors on the horn are good and clean as on a lot of bikes, the lights wont work unless the horn does. check the horn for ohms. how much resistance does it have? just cuz it works when the lights are off doesnt mean its good.
i'm not sure if the ciao has this type of setup or not, but some peds have a resistor built into the tail light housing. look in the service manual to see where its at on a ciao. the resistor keeps the head and tail light bulbs from blowing at high revs. test it with an ohm meter. the service manual should give you the values you need.
most times i would start here, but since ciaos are such pos bikes and the magneto is such a pain to get to i left this for last. test the wires coming out of the stator with a volt meter to ensure you have the correct voltage and wattage. pull the engine, remove the flywheel, and check to see if the charging coil in the magneto has and rust on its pick ups, or its base where it mounts to the engine block. a little bit of rust can impede the magnetic properties of the charging coil as the magnet passes over it as the engine runs. do an ohms test on the coil to check its values. if the gold colored film is damaged or the wrapped wire is exposed, your coil cant work properly as it is shorting out inside itself. clean the magnets inside the flywheel.
electricity flows like water. it has a starting point (the charging or lighting coil in the magneto) and an ending point (which is where the charging or lighting coil is grounded to the engine block). and as long as you have a good clean flow everything should work fine.