Yes. You can walk over to the guy, get close enough that he can’t confuse that you’re talking to him, and ask him if he’d like to go to the dance with you.
It’s a normal and acceptable question, and may perhaps best be done directly and simply.
(I think the close-range part may be important, because when I was in high school, there was a beautiful smart older girl whom I didn’t really know much at all, who I am certain wanted to ask me to the dance, but she tried just calling out my name when there were many people around, from maybe 20 feet away or more . . . and, I’m still a bit ashamed to say, I pretended like I didn’t realize anyone was calling my name. I did that at least twice. I didn’t expect and didn’t feel prepared for such a situation. But if she had come right up to me and talked directly at me, I would probably have blushed and maybe said I knew nothing about dances, had never been, and it wasn’t really my thing, but I’d probably have said yes to any kind of proposal she made in a way that I couldn’t pretend not to have heard.)