Sorry I am about to jump on someone's answer or part of it:
Stand in the parking lot and call 911.
Well if this was not some sort of a silly trick or joke question, then this would be one of the worst things that you could do! In the event that this is related to terrorism and is a ruse to get people going, guess where most of them would go - right to the parking lot. As they congregate near the exit door or in the parking lot entrance, the real blast goes off killing many. This is in fact how the blast was accomplished Australian tourists on some filthy vacation dump of an island nation (I obviously forget where - was it Bali???) within the last year or so. A blast went off inside injuring some, but the big blast went off several minutes later out in the parking lot to which most of the people fled after the inside blast. If you ever have to vacate because of an emergency that may be due to terrorism, then do not congregate with other people because if there is a secondary attack, this is most likely where it will come right in the massed crowd.
Now back to the diner:
If I heard the noise and then saw the package
I would immediately assess the situation. As I assess I would either be already taking action or deciding none was necessary. If I had any suspicion, even just a gut feeling, that the noise I had heard was the bag/package by the trash, and I also suspected some sort of an attack or other danger, I would likely vacate the premises. It is possible that this could be a number of things such as a bio, chemical or explosive attempt or it could be nothing; but if there was even a hint of bad things it would be better to act and to exit the area. I would not approach the item, and certainly would not touch it. You touch it, it go boom, you in pieces fly across the room...
Note if I did not really suspect some sort of attack, I would still attempt to find out to whom this package belonged to find out what was inside. If no one claimed it, and the waiters knew nothing about it, I likely would become suspicious and probably leave. if someone said that a shady character who had been chanting prayers in the corner booth up until a few minutes ago just left it as he walked out - well you have the picture, don't you - a fat middle aged man getting out fast.
As to others getting contaminated, if it is bio or chem, tough stink pickles! I am getting out in case it also might be an explosive. I would exit by the exit furthest away from the item and that was accessible without passing the item. I would alert others also, as I was leaving or possibly advise them to leave. I would try to be the first out as anyone waiting in ambush would quite possibly not go for the first person but wait for someone behind. Even if they chose to hit the first out, it would be a calculated risk on my part. Before leaving I would give a good quick scan to the outside if possible. I would exit low through the door and get away from the fatal funnel (outline of the door) as quickly as possible. As I exited I would take evasive action and head away utilizing cover and concealment. I would try to stay out of the light, and head to a secure darkened area behind cover, Dependent upon the situation I may or may not have my firearm out.
As far as a napkin over the face, I don't know if the second or two to wet a napkin and put it over my face would be better or worse as time spent inside. A gas mask would be better, and yes I often have mine with me in NYC when working. (I really need to get a family pack, or at least escape hoods.) Don't think just because something went pop that, if it actually was a terror device, the contents have already contaminated you or done so sufficiently to harm you, or that the item actually worked. I am not assuming it did not contaminate me either, but I am assuming that I would be safer away from a possible device that may not have gone off properly and is still ticking so to speak. As I said if I suspected some sort of an attack I would get out, and take my loved ones with me.
Please note that I keep stressing if I suspected some sort of an attack. I am not running for every little thing, nor grabbing my gun when a firecracker goes off, but I sure am going from yellow alert to orange and maybe even to red if I get hinked up. When awake, I am never at the white level (totally at rest - not even most of the time I sleep) and that is the trained LEO and trauma survivor in me. My post 9/11 my yellow level is more at the alert that was pre 9/11 yellow level. I am not talking about government alert levels either, but levels of alertness by which LEOs have been trained for years. Levels of alertness by which we need to conduct ourselves as law enforcement officers if we expect to arrive alive at the end of the shift. Not only do we teach other agents to be this way at work, but to be this way all of the time or as much of the time as is possible. To borrow the answer of the question, 'What is the price of freedom?', let me just say I am talking about: 'Perpetual vigilance'!
From outside I could better assess the whole situation. Are people dropping dead inside or outside? Are others leaving? Is there an attack on the congregated mass that just fled? If so what type, by who, and from where? Are there suspects in the area? Are suspicious people waiting in cars down the block, or in doorways, or on roof tops nearby? This is all info to call into authorities along with a description of the noise, the package, the restaurant and so forth. Think do you even know the exact location and name of the restaurant you were inside just moments before! Yes, of course I am calling 9/11, but not until I am safe and have assessed the situation enough, in a brief time, to give them as much info as possible based upon such assessment. As all this goes on, I am having the family keep their eyes and ears open, also assessing. They would also need to assess their own conditions every minute or so at most for any possible signs of contamination. Keep them busy helping you in this way, to help avoid a panic situation.
Now back to spreading bio or chem agents. As far as spreading any bio or chem agents, tough stink pickles (yes they are brown and smelly). The agents are not contained inside a building like a diner anyhow. You must also bear in mind that the pop may have been a failed detonation of a bomb, and that the bomb may be in a sort of "hang fire" state, just like when you firearm goes click and no pop or only a primer pop emanates from the muzzle. Wait till a count of ten, then open the action, or the round may still go off as you open it - ouch. Not a common occurrence, but it has been known to happen, and just imagine the quality of some of the stuff a kook or terrorist uses; sometimes great top shelf and other times bargain basement.
Back to bio or chem, if it is bio, chances are it will be an agent that takes time to effect the victims. Many viral and bacterial, agents take time to effect the victim adversely. If that bag had white powder, gas, smoke, bad smell, or a mist out of it, I would recommend a decontamination with plenty of water. First though take off clothing, brush of any loose powder from your skin and hair, then apply copious amounts of running water. Even if it is a chemical that reacts with water, if you got the majority of it off, then my guess is that running water and plenty of it will possibly wash it off before it can harm you, but I am hopeful it would not be an agent that reacts violently to water. Now if it is really cold outside, well wait for help if you are not seeing any ill effects.
There are other things I might do, but most everything I would do would depend upon my initial and then continuing assessmentS of the situation as it unfolded.
All the stuff about isolating and confining is the stuff of too many movies and horror stories. The truth of the matter is with chem attacks the elements usually have to be dispersed in certain ways for maximum effectiveness, and any other type of dispersal is usually only pretty much ineffective (if at all) to somewhat effective. Most liquid, and powdered chemicals are also fairly easily contained, especially in a small scale attempt as would likely be the one just described. Most aerosols would not be spread effectivly either. Gas would likely be of a very small scale, and would dissipate rapidly. If I have it on me well sorry if you drop dead after you try to help me once I am outside, but if the authorities are called on this one, they will spread the stuff themselves as would have the AC or heating unit in the diner, or the other patrons or workers in the diner. They are simply not covering the diner with Saran Wrap (LOL) because of a burst balloon or a call about a suspicious package unless there is some prior info about this event or other recent similar events, or you can give a pretty darned good description of what sounds like a chem or bio attack. A popping noise and a burst bag that may or may not have been the source of that sound is not going to get the full scale CDC and military type of a response. That would be paranoia. Paranoia is almost a good thing up to a point, but not when over done for every little thing. It is almost ok as when the post offices were closed down due to suspicious white powder, but that was only after Anthrax attacks had been confirmed.
Of course you could always ask WHO FARTED in a loud voice (as already suggested by someone) to see the reaction of the crowd, and then just keep stuffing your face and enjoying the aroma.