The heat isn’t over until all swimmers finish the race. The referee(s) weren’t incorrect.
But they WERE wrong.
So what actions are there for the swimmer to carry out to continue in the heat?
The cited rules don’t actually address what the referees enforced.