The numbers in Roman numeral analysis are relative to the current key of the song. It works fine for songs that modulate.
> It works fine for songs that modulate.
By definition, modulation is the act of not remaining diatonic. Modulation = changing keys. Diatonic = staying within key.
So, no, we don't need to assume anything about diatonicity in order to successfully do harmonic analysis using Roman numerals.