You can do some dirty stuff with autonumbers on database level, but the easiest workaround might be not to create the object.
You could create a non-persistable helper object on which you collect all the information and copy everything to your persistant object when the user saves it. Doing so, you don’t even create the autonumber in case the user hits cancel.