He wasn't a rescue diver, he was the local expert, having mapped the cave and knowing more about its structure than anybody else in the world. he was truly qualified to say that Elon's attempt wasn't going to work and was hogging to much attention.
That said, Musk's comments were unnecessary.
He was a diver- just not a rescue diver in this case.