It was probably a vent valve, although SpaceX calls it a pressurization valve
As to the trouble they're in, I suppose it depends on how severely the tank was damaged. Rockets aren't traditionally designed for easy maintenance, so replacing the tank may be very difficult. They might have a better chance if they could replace the whole rocket and send that one back to the factory. Disassembling the rocket to replace the tank may prove to be a major undertaking.
