Can I cancel a transaction in the process?

No, you cannot cancel the bitcoin transaction. To get back your funds, you will need to contact the recipient (or seller) and request a refund.