Yes, it is most certainly possible.
Like many things, this is divided into 3 parts :)
1. On the step where you are expecting the user to click submit. Read more about how to Add another tooltip.
2. Create an invisible tip that would advance when the user clicks on the cancel button.
3. Add a branch to this new tip that would close the guide. The branch is activated as soon as the tip is 'complete' which on our case would be when the user clicks on the cancel button.
You can read a detailed description about branches here - https://iridize.zendesk.com/