I think you can make a case that breaking a rule intended to prevent immoral activity is in and of itself immoral, even if breaking the rule didn't result in the immoral activity.
It's arguable either way, morality isn't a formal logic. There's no right answer, and it's mostly judged by popular consensus... If there is a final authority, they don't publish their notes. :p
It would be immoral to sell weapons to your nation's enemies but not to your allies.
Unless you're saying that disloyalty and betrayal are not issues of morality.
It's very interesting to read here that Jensen is immoral for betraying his wife but not for betraying his country.
But then it would be the thing that is sanctioned that is the immoral activity, not the breaking of a sanction, right?
It's like you said, unlawful != immoral.