Here is a file with a semi transparent planetary ring, that casts a semi transparent shadow. Actually there are two rings. One original with a glass shader setup which was one of Ulco's ideas. It's set to not "cast shadows".
The other one is "invisible" and has a greyscale map in the opacity slot, which creates the shadow.
Important: the Ray detail multiplier is set to 1, otherwise everything behind the ring would look sort of pixelated with the default setting of 0.25.
(Don't care about the cheesy planet texture. Just make your own...
)