Yep, there's a coffee bar & gift shop on the roof, after the elevator, and before you start the "Climb of Death(tm)" ;-) We didn't eat there, but I am fairly certain they had sandwiches and possibly gelato and snacks as well, but I don't recall there was really any place to sit down. I'm also guessing that it is probably seriously overpriced.
I would do as the other poster did, and carry some food in my bag. Alternatively, since it sounds like you will be doing St. Peter's prior to the Vatican, you will have to walk out of the Piazza and around the walls to the Museum entrance (I think about a 10 minute walk). There are cafes and street cart type vendors along the way, as well as across the stret from the piazza--though again, that will likely be pricy.