Can you play music for an acoustic guitar on an electric guitar?

Yes. The electric guitar and acoustic guitar are played essentially the same way (I've never seen an acoustic with a whammy bar, but you don't have to use it on an electric either).