Well, for running and surrendering the hero could appear at the nearest town (or castle only) that is not the current siege location. Loss of resources or mana could work too, even loss of morale and/or luck for the next battle - HOMM2 supports bad luck from visiting the Pyramid when it has already been visited for example.
For defeat, the hero could be removed from the map and hero pool entirely (permanent death, but only for customized heroes, so you don't get the problem of having a standard hero die in one map of a campaign and then appearing in the next). And yes, if you wanted to you could use this as a way of blocking running or surrender, but it would have to be able to apply to both human and AI players. Not sure if this would be better as scripting or as a map option to block certain options for getting out of a battle for certain or all heroes.