Is it true that I have to wait 24h before I can board a plane after scuba diving?

Yes. The low air pressure in the cabin can cause decompression sickness, which can lead to serious health issues. It is therefore important that you schedule your last dive at least 24h before your next flight.