Take a book, and go anyway.
I'm nervous a lot in social situations. So, I take a book. If I can't find anything to do, I sit in the corner and read until it's time to leave. If I have a book, at least I look like I'm in control of the situation, if I seem a little eccentric. If I'm having a good time, I put the book somewhere safe, and just have a brilliant time. Think of it like a social security blanket with pages. Just remember: Talk to people every so often.
Yes, I am recommending taking a book to a dance. Then again, I'm odd, so I might not listen to me if I were me. Well, in fact I listen to me all the time. And I turned out fine. So I think I'd recommend it.