This sounds very similar to a resort dive I did in FL before I got certified. No we did not do a cave but with only about 15 minutes of training my buddy and i headed down with the instructor. At about 30 feet my dive buddy started experiencing a mask issue. we headed to the surface to clear the issue and to relieve my buddy who was starting to panic. After she calmed down we went to 43 ft and stayed there for about 42 minutes. Overall it turned out ok, but it could have been really bad.
Come to find out, my buddy had her mask so tight it could not make a proper seal. The skirt was deformed by compression against her face. No, the instructor did not pick up on that. We only figured that out a couple months later when we did another resort dive and the instructor saw her mask was too tight.
The incident nearly caused her to give up on diving but I convinced her to get more comfortable with the mask, snorkel and fins in a pool where we were staying. After a couple of hours of playing in the pool, where she knew she could easily bail out if needed, she got very comfortable with the mask. Since then she has started the certification process and is well on her way to having a lot of fun diving.
If I had to do it all over again, I may have done it differently. Fortunately it worked out this time.