25-key (2-octave) keyboards are suitable for inputting MIDI melodies (or percussive rhythms), with assumption that you accept the necessity to use octave transpose buttons frequently and/or record shorter segments. Perhaps they can be used for performing some very limited range parts (e.g. melodies or bass lines you compose yourself with the instrument range in mind), but in principal they are meant to be a compromise, providing keyboard feel while taking less space and costing less.
The piece you quote could not be even played on a 37 key (3 octave) keyboard. The lowest note is G2 and the highest is D5. Small keyboards typically cover full octaves from C to C, so you would need 4 octaves to play it. It would fit if you transposed it e.g. by a major 2nd down... but if the piece is meant for singing, that might not be a good solution. You will very quickly find other pieces, even on a beginner level, that don't fit in 3 octaves.
49-key (4 octaves) would be on the edge of usability for learning and performing on an entry level. Possibly you would be able to play lot's of beginner repertoire, maybe sometimes skipping some notes, or transposing them. 61-key (5 octaves) would be a better choice for longer run. For reference, standard piano keyboard has 88 keys (8⅓ octaves).
You write that your budget is tight, but you should consider also quality of the keys. Mini keys and synth action keys provide less control of dynamics, which is something you should be practicing when learning to play piano. Full size weighted keys are much better but also expensive. Semi-weighted keys might be a reasonable compromise for entry level practicing. I would say that 49-key semi weighted keyboard might be better practice instrument than a 88-key synth action.