The CM rejection you get will depend on the capabilities of the opamp. Look in the opamp datasheet to see what kind of CM rejection it advertises.
But in general, yes, that is what you are using the differential amplifier characteristics of the Opamp to do.
However, a couple comments about the sketches. First, you do not use an Opamp in open loop configuration, so the diagram on the right should show the full amp circuit with feedback. The CM rejection you get also depends on the feedback configuration, and how balanced an input impedance you present to the input signals. Look up instrumentation amplifier configurations of Opamps to see how to best reject CM interference.
Finally, the drawing on the right is not drawn well. It should show capacitive coupling of the CM interfering signal to both inputs on the opamp (via two separate capacitances), not just a coupling to one side (with and implied low-impedance tie via the differential signal source, which is not always the case).