Discovery of a nitrogen-rich UV-bright star in the globular cluster M5