It's easy to know, when you figure out what the guard ring is actually doing.
A guard ring can be for two different purposes - either to help with EMI shielding, or to reduce current leakage.
In the former, it would usually present a different voltage (not necessarily) and different source with low impedance that can help absorb some of the EMI energy before it gets to the inside trace. Leaves the inside signal trace unaffected.
The latter, you want the guard trace to be at the same voltage as the protected trace, and it should be connected to whichever path has the lower impedance (but same level). Luckily, for opamps, usually they have both their input terminals by design at the same voltage. If you have an inverting opamp, usually the +in would be connected straight to ground (call it "true zero"), and you'd connect your guard to that. The opamp will create its own "virtual zero" at the -in by opamp action, but this might be connected to high impedance nodes. So you draw a guard, connected to the +in/true zero/low impedance net, around the virtual zero net. Since both true and virtual are practically the same voltage (call it 0V, for example), then there is no differential voltage between the signal path and the guard path, and so no PCB current leakage can flow from one to the other (otherwise possible to happen if the guard path was not surrounding, and there was some other separate voltage rail near it).