Seems like two issues.
One, as a general rule should you bring leftovers into the office? I have always been in offices where it was fine to bring in leftovers - half a birthday cake, cupcakes, chips and snacks. Obviously there are some you should leave home but generally I haven't seen anyone bring something they should not have. And, if you don't want to partake then don't. Obviously some people are fine with free food.
Second issue is alerting others in the office that they were left out of an event. That is unrelated to any leftovers in my opinion. And, I think it very much depends on the event, the size of the office, who was and wasn't invited and how word gets out that some people were left out. A 10 person office and not everyone is invited to a Super Bowl party and they are all 20-something might be bad form. A large office with multiple age groups and a more formal event like a wedding, well not everyone should expect to be invited. It's still polite not to discuss in front of everyone though.