Getting flagged doesn't auto ban you. It makes it so that in group events (Full marks and house pride) you get sorted with other flagged players, thus making the chance of someone getting reported for cheating higher and the whole group gets checked.
As for how to "unflag" the account, the only way I know is to spend real money as paid accounts don't get flagged, although I wouldn't recommend that in this case. So long as you don't log on during a group event, and you get rid of all excess energy quickly, you should be safe.
If you were going to get banned, it would likely happen between 0-3 days after a group event, so if you've made it this far you should hopefully be safe for now.