You can hold your breath while scuba diving as long as you don't ascend without exhaling. And you can even ascend just a little bit, if you're deep enough; you're not going to embolize coming up from 90 feet to 86 feet with the same amount of air in your lungs. (Those same 4 feet could be a problem if you're ascending from 4 feet to the surface though.) It's just simpler to tell new divers to never hold their breath.