Yeah, you could make it so that it is -compulsory- to break an alliance before you can even have the option to attack an ally. Or you must have a diplomat making a real declaration of war before you can attack a neutral. And alliance agreements must be binding, for say 10 turns, before you can even opt to cancel alliance.