I'm not positive, but every time I attempted to interact with the cake, all the options aged the Sim up, whether it be taste the frosting, remove the candles, blow out the candles, etc. I could be wrong, though. I couldn't find any safe ones, so I just kept the cakes, until the events were over. There was a birthday party for my first Sim, and Summer Holiday - both non random townies. In fact, I attended the FirstSim's birthday, (Daniel) with the BFF household, then when I switched to manage Daniel, I got an invitation to Summer's party. That's when Daniel got stuck in the roof.
After the events were over, I noticed both Sims had aged up, even though the cakes were never interacted with & had spoiled.