the music tabs i see on UG will have the melody tabbed out and a chord
name above the tab like so

G7 -- chord symbol

g-- whatever melody transcribed here

is the G7 the chord the scale is playing over ?
depends on particular tab. Usually it is indeed the chord the melody is played on (or chord which you can use to replace the melody) or sometimes it just simply tells you that the 'melody' is just a G7 (or w/e other chord) arpeggio
ok so it could be either

are there an easy way to tell if its supposed to be a chord
played over or if its arpeggio being used without analyzing every
note in the transcription ?
don't think so. Does it even matter? in both cases you can play it over the chord (or play the chord over it)
good point , i guess its easy enough though if it has more notes than a 7th chord
its just a melody over a chord .