I am a novice to mathematical logic and model theory, just starting to learn the basics. I'm confused about the difference between defining theories within ZFC and defining theories directly in logic. For example, in standard math, a group is a set satisfying the three group axioms. However, in logic I am told that we can define a first-order language for groups without ZFC: We need a constant symbol $e$, a product function $\cdot$, and the three group axioms (written in logic without ZFC).
These approaches don't seem equivalent to me because the ZFC version restricts only to groups whose underlying set is indeed a (ZFC) set. However, within ZFC one can define proper classes that have a group structure, such as the surreal numbers.
I am tempted to say that groups built from proper classes are "allowed" in the pure logic version, but that can't quite be right either, since in pre-ZFC logic the terms set and proper class are undefined. Still, it seems fair to say that the logic version of group theory could be describing the proper-class groups that can be constructed in ZFC, whereas group theory in ZFC is not describing them.
Are the two notions of group and subsequent theories equivalent? And a related question, How can (first-order logic) groups be modeled in ZFC, when there are some (first-order logic) groups whose existence in ZFC is denied?