Check this out. Not exactly what you're asking for, but it does create rings for a planet. Found it somewhere here in the forums.
As far as masking, there are a lot of examples here from various threads as well as files to download to better understand.