Yes, it is possible to cancel invoices even after a receipt has been created, in the event of a user mistake. Follow the steps below to properly handle this situation:
Cancel the Receipt
Change the receipt status from Realized or Received to Reversed, then to Cancelled.
Cancel the Invoice
Change the invoice status from Approved to Reversed, then to Cancelled.