Nope. Let's look at the transcript for a timeline.
- Day 1: Twilight Sparkle and Spike arrive and meet the rest of the girls.
- Night 1: Twilight Sparkle and Spike sleep in the library, as you said.
- Day 2: Twilight Sparkle goes about trying to get the girls to be friends again. We know that this day is Thursday because of Principal Celestia.
Principal Celestia: [on P.A. system] Good morning, students, and happy Thursday. Just a reminder to pick up your ballots for the Princess of the Fall Formal today. They are due at the time the dance starts tomorrow night, so don't forget to turn them in and make your voice heard.
- Day 2 (continued) After getting the girls to be friends again, Applejack confirms that the dance is still one day away.
Applejack: All right, girls. Dance is tomorrow night, and we still don't know how we're gonna get Twilight the votes she needs to be named princess. Right now, folks only know the Twilight from the videos Sunset Shimmer posted online. We need to help 'em see her differently.
Here is where your confusion is probably stemming from. After Day 2, we don't follow anyone to see where Twilight Sparkle and Spike sleep. However, we pick up with Sunset Shimmer coming to Principal Celestia with the doctored evidence at the beginning of Day 3. We last left the girls in the gym, so the destruction had to have happened over the course of night 2.
Vice Principal Luna says they'll move the dance to the following night (Which would be day 4)
Vice Principal Luna: I am afraid enough damage has been done to the gym that we will have to postpone the dance until tomorrow night. If you will excuse me, I need to let my sister know about this latest development.
The conversation between Twilight Sparkle and Flash Sentry confirms that moving the dance to the following night would exceed the time restriction
Flash Sentry: So, uh, I was wondering. If you aren't already going with somebody, wanna go to the Fall Formal with me tomorrow night?
Twilight Sparkle: That would be... Tomorrow night!? No, no-no-no-no-no, no no no no no! Nonononono! I can't! The portal! That'll be too late! [panting]
Flash Sentry: One "no" would have been fine!
Rarity: Everything okay in there?
Twilight Sparkle: Yes! [to herself] Only it's not okay. It's not okay at all! If I don't get my crown tonight, I won't be able to go back to Equestria for another thirty moons! Oh, what are we gonna do?
So, this all proves that the conversations with Vice Principal Luna and Flash Sentry must occur on Day 3. This means that the three day timeline follows.
- Day 3: Twilight Sparkle and the girls work together to get the gymnasium back in shape for the party.
- Night 3: The girls are able to get everything set up again in time, and the dance takes place on Night 3