I felt stupid at first because I immediately thought it was Elsa but I knew there was never a part with Elsa like that so I was really confused. Then I realized it was Anna at that one part and I felt really stupid. Then I realized I wasn't the only one.
I always thought it was referencing beauty and the beast. Cause the same things happen in beauty and the beast. In Aladdin it's not a spell. It's just a genie with magic. In beauty and the beast it's actually a spell on the castle.