The following link shares some information regarding throwing balls in the park.
CBS Story on Tennis Ball Bombs
You also want to be careful with sparklers and "Bang Snaps" with young dogs. Young dogs are often adventurous and don't know better than to chase after things that make noises and put them in their mouth.
Regarding Firework/Thunderstorm Anxiety:
This is the time of year when it feels like we are writing prescriptions for dozens of anti-anxiety medications for dogs whose fear of fireworks varies from trembling and whining to breaking through drywall and escaping... Sometimes dogs only have thunderstorm anxiety, but often dogs are afraid of loud noises in general.
Please talk with your veterinarian whether your dog's case is severe or not. It's a good thing to have this conversation.
There are some homeopathic remedies that can help. Rescue remedy is one I have heard of some people having success with, as well as Zylkene and Solliquin. These are over-the-counter medications. We also have the ability to use prescription medications (such as doggy/kitty valium) and even doggy prozac. Signs of anxiety include drooling, inability to rest, panting heavily, as well as whining. If this is something that can be of help to your dog/cat, please let your veterinarian know.
There are also behavioral modification techniques that can be used when there are no thunderstorms or fireworks in the immediate future. These involve playing music/CDs with the offending noise and while continuously keeping your dog calm, slowly increasing the volume and reassuring your pet. Sometimes you can also train your dog to go to a "safe spot" either a kennel or interior bathroom where they will feel safe and confident.
Have a safe and happy 4th of July, from my four-legged and two-legged family to yours : )