Ring element and turbomachine having such a ring element