There are a lot of different types of gas! be sure to (l)ook at things, that way you can see what they are! You should be able to shift+d yes, unless the ring is cursed, frozen or sentient (in some cases)
One of my rings was frozen (and I don't really know what that means, although you've given me a clue here) but I couldn't shift-d any of them, and instead of s message about not being able to get the gem out, it just silently dropped the whole ring...