I've unknowingly triggered more attacks of opportunity than I care to count this way.
I don't really have a solution for this. Maybe the mouse cursor could change color if your character is about to trigger an attack of opportunity?
This happens to me a lot, and I think your suggestion is quite good actually. As long as there is a small pop up tutorial that explains it the first time it happens.