The onclick solution on the button by sharif779 (above) was the only solution that worked for me, because it actually intercepts the submit event BEFORE it is executed.
This is just to show what is possible with a function inside the onclick attribute of a button (which can be easily inserted by js/jQuery).
https://www.w3schools.com/jsref/event_onclick.asp
var $confirm_message = "'Do you really want to change me?'";
var $save = jQuery('<button type="submit" onclick="if(confirm(' + $confirm_message + ')){return true;}else{jQuery(this).next().click();}">Save</button>');
First problem I ran into was quotation mark caos in the code embedded in the attribute. I solved this by defining the variable for the message with the single quotation marks already included.
The second problem was: if I just return false in the else branch of the confirmation, it works but the original dialog keeps staying open. So I added the click action for the cancel button, which comes next to the save button (sibling). So, jQuery(this).next().click();
executes the click on the Cancel button.
In summary, this effectively prevents the submit event and it does so by by clicking cancel first. It works like a charm also with ENTER events in Edge and Firefox just the same as with mouseclick.