"Ground" in this context is really a misnomer. It's only a reference. For example, take this circuit that you probably know:
simulate this circuit – Schematic created using CircuitLab
and connect the "ground" to another control instead:
simulate this circuit
You can think of it as being the exact same circuit with the exact same behavior, provided that the reference control stays constant. It simply centers on this new reference, and there's now no need for an explicit ground.
The actual rules for opamps are:
- The output goes as far as it needs to, to keep the two inputs equal.
- If the "+" input is higher than the "-" input, it goes up; if lower,
it goes down.
- If the output hits one or the other supply rail, it stops there.
(actually a volt or two short unless it's explicitly a rail-to-rail design)
You'll notice that there's no mention of "ground" in any of that. Only comparing the two inputs to each other and the output to the supply rails. That's it!