Yes, the ballroom scene happens before the arrest! Some might understand her struggle, and some won't, but she has anxiety and panic attacks, and this is visualized by the flickering scene at the ball ^^