Your teacher is correct, any note on an F line is an F. The song is in the key of G, so an F would, by default, be played as a sharp.
As long as you know that the F is played with a sharp (because that is the key of the song), then you would be playing the correct note.
(Your music teacher is trying to teach you something. The piano makes a LOT of noise (I'm guessing). If the teacher needs you to know that you hit a wrong note, then teacher will need to talk over your likely-wonderful playing, and might have to raise his voice. Part of the job, don't ya know. Your job -- is to accept criticism without thinking it is a personal attack. 😉 Hit a few wrong notes, now and then, just to keep your teacher alert and awake.)