Yes, that is true, sunlight will kill mold....but it won't remove the mold that is there and not all mold in hay can be exposed to the sun. Each blade and leaf has a backside and most will be shaded by the rest of the hay. So it is still a no-no for horses. A big no-no, always. Not worth $5 or $100 or even $1000 to have a permanently crippled horse. They are delicate little flowers....very expensive little flowers.
So if it is safe for the ruminants, go for it. Avoid breathing the dust yourself, though. You can have no problem with mold today and be very sick and sensitive tomorrow and for the rest of your life. Mold is nasty.
My father took a course in mold remediation a couple years ago and came home and ripped out the walls in his bathroom and replaced them. He gave me many instructions and cautions on dealing with mold.
I spent quite a few years working with horses in extreme Northern Maine, where the winter weather keeps horses in their stalls sometimes for weeks at a time. More time spent in contact with dust and mold, less time in fresh air. Years ago, heaves was common, I saw it in many older horses. Not so much now that we understand mold and keeping the barn ventilated even if colder.