I would like to add some precisions to Emilio Pisanty's answer, and show that you have to be cautious with the notation $O(x)$, when $O$ is an operator.
The translation $x \to x'=x +a$, induces a transformation in the space of states, which is is :
$$|\psi\rangle \to |\psi'\rangle = e^{-ia.P}|\psi\rangle \tag{1}$$
This corresponds to the transformation :
$$\langle x |\psi\rangle \to \langle x |\psi'\rangle = \langle x - a|\psi\rangle \tag{2}$$
That is :
$$\psi(x) \to \psi'(x) = \psi(x-a) \tag{2a}$$
An operator $O$ transforms as :
$$O \to O' = e^{-ia.P} ~ O~e^{ia.P} \tag{3}$$
You can check that all this is coherent and that the object $O|\psi \rangle$ transforms as a state.
The transformation $(3)$ corresponds to the transformation :
$$\langle x |O| y\rangle \to \langle x |O'| y\rangle \tag{4} = \langle x -a |O| y -a\rangle$$
That is :
$$O(x,y) \to O'(x,y) = O(x-a,y-a)\tag{4a}$$
Now, if you compare your first formula with the formula $(3)$, you see a sign inversion, so, starting with your formula (which corresponds to a translation $x \to x - a$), we will have :
$$O(x,y) \to O'(x,y) = O(x+a,y+a)\tag{4b}$$
which is true for any operator, so it is true for the density operator. Of course, you may be interested only by the diagonal terms, with $x=y$, but it is only a special case of the formula $4b$, that is :
$$O(x,x) \to O'(x,x) = O(x+a,x+a)\tag{4b'}$$
So, if you understand all this, you may write, in a short notation $O(x) = O(x,x)$, but if you have some difficulties, it is better not to use it, and to use notations $O,\langle x |O| y\rangle, O(x,y), O(x,x)$
So, your calculus is correct.