(This answer is based on the Newtonian model, ignoring relativity. Relativity would yield the same results, but from a very different point of view.)
Using the center of mass instead of treating every atom of an extended body individually (the integral approach) is a simplifying model that really hits the exact model only in very rare situations.
But in many, many situations it gives a very good approximation of reality. So, it's very often a useful model. As with all models, it's crucial to know its limitations. You can surely use it if the gravitational field that we are dealing with, is (nearly) constant in magnitude and direction over the whole geometry of our object.
For example, for bodies smaller than a kilometer on Earth's surface, the field variation is less than 0.01% from its average (the main factor being that gravity of a sphere decreases with 1/r²). And we know the value of Earth's gravitational field at its surface (g = 9.81m/s²). And mathematicians have shown that the gravitational field of a spherical object is exactly the same as a point-mass gravitational field (as long as you stay outside the sphere).
So, if we replace both extended objects (Earth and our 1km body) by point-masses at their center of mass, we can expect the results to deviate from the exact integral results by 0.01% or less. If that's okay, we use the center-of-mass model. If not, we use the integral.
Now for the rod: The gravitational field of a rod is significantly different from that of a point mass, unless you are very far away. So, in your given problem, there's no justification for replacing the rod with a point mass and you have to resort to the integral. Luckily, the "particle" seems to be a mass concentrated in one point, so there's no need to do the double integral over both geometries.
Gravitational force is centre to centre force.
This is your misconception. From its nature, it's a mutual force between individual particles. E.g. every atom of Earth individually attracts every atom of your body (and it attracts every other atom of Earth, as well as every atom of your body also gravitationally attracts every other atom of your body - gravity does not "know" to which body an atom belongs). Treating gravity as "centre to centre" already implies that the center-of-mass simplification is applicable, which is not the case here.