Detecting ring systems around exoplanets using high resolution spectroscopy: the case of 51 Pegasi b