Commit scripts are invoked as part of the commit process. They could always fail the commit with an error, but I don't think that is the approach you would want. Op scripts and event scripts could modify the configuration and not commit it, if that really is the behavior you're looking for. It would be the same as if a user went into config mode, made changes, and then left those changes uncommitted. To do this, just use the <load-configuration> RPC rather than the jcs:load-configuration template.
However, I'd advise against doing this. Leaving uncommitted changes in the candidate configuration blocks other users/scripts from using exclusive or private configuration mode (which are safer than normal configuration mode) and it also means that someone else might log into config mode, make changes, and commit without noticing that other pending configuration changes are waiting to be made.