They are naval mines. Dory mistakes the bombs for balloons, thinking they are balloons for the “party”.
Naval Mines via kwout
Naval mines are relatively low-cost and highly effective weapons. Potent ship killers, just the threat of mines can deter an enemy from sending his surface ships or submarines into an area.
Mines are difficult to locate and sweep. They can be set to activate only when a certain ship signature - the ship's machinery sounds, movement through the water, or hull metal - is detected.
Ship-counts can be set in the mine to allow a specific number of ships to pass before the mine fires. Some mines are bottom mines, placed on the seafloor, while others are moored mines suspended in the water with part of the mine serving as an anchor.
Learn more about naval mines on FAS.org.
Of interest, discover 13 Things You Didn't Know About Finding Nemo from Screen Rant.