Music and songs can often feature a chord that is out of key i.e. a non diatonic chord. This can happen in the most basic of songs
It's important to know what to do when the scale from the key of the song no longer works. The solution is to always follow the chord i.e. play notes from the arpeggio of the chord you're playing over.