When it comes to "learning the song", you can most definitely learn the structure of it on any type of guitar. The only thing that would be difficult to learn on an acoustic are maybe faster runs/solos.
Depending on what type of acoustic you have or whether or not it is a cut-away type (bottom section cut out so you can reach all the frets) it may not even be possible for you to play certain things.
So ya, basically you can "learn the song" on an acoustic. I'd say you "need" an electric for when you actually play the song obviously, for solos or fast sections (assuming your acoustic is a little bigger/bulkier. Electrics are generally made to be able to move around more quickly on), and for what I can only describe as "fine tuning" which are all the nuances and slight differences in adjusting your play style to the new tone you are getting.