Can I cancel a message that has been sent but wasn't delivered?
Yes, if the message hasn't been delivered, you can cancel it. Tap on the message then delete it and the other user will not receive the message you have just sent. I have tried this method and I can confirm it works.
No. The message will still reach the person no matter you delete it before being delivered or not.
I have tested it and deleting the message does not cancel its later delivery.