First atmosphere detected on a habitable-zone rocky world