You are correct, and in fact, E minor is known as the "relative minor" of G major because the notes in those scales are the same.
You can also think of it the opposite way - G major is the "relative major" of E minor.
This applies to all keys --- for example: A minor is the relative minor of C major. The notes in A minor are exactly the same as C major.
Now, let's talk about the C chord you mentioned. The notes that spell a C chord are C (root), E (major third), and G (fifth) - all of which are in the key of G major, so a C chord is a good chord choice if you want to stay in the key of G.
You are correct that choosing to play, say, a Csus4 chord would take you out of the key of G, because the fourth note of the chord (F) does not fall in the G major scale.
That said, it's not like you need to avoid that note at all costs! Just because a Csus4 chord isn't in the key of G major doesn't automatically make it a bad chord choice ... it might sound interesting and desirable -- it's just that the chord doesn't fit into the key of G major. Plenty of songwriters and composers borrow from other keys all the time (this is called "modal interchange").
Hope this helps!!
Mike
Keep rockin!
Mike Olekshy
GT Guitar Coach