Your typical navy wreck dive that was either intentionally sunk, or has been well explored shouldn't have risk of ammo spontaneously exploding from corrosion. However if you're poking around in an unexplored wreck with live ammo, and you bump into live-ammo or a depth charge, that's on you.
That said, I'd be far more concerned about other risks of diving in an enclosed environment, and this is one of those areas you definitely want the appropriate training. I can't tell if you have that training, but a lot can go easily wrong, such as getting lost, trapped, knock something over on yourself, silt out the place, bump into the ceiling, etc.
Handgun or rifle ammo, you'd basically have to be practically touching it to be injured, even if somehow managed to explode. Bullets need a barrel to accelerate. The shell could theoretically act somewhat like a grenade with larger rounds, but the water would slow down the shrapnel in a relatively short distance.