Now, forget about the lexiographic ordering I introduced (the one that had $x > y > z > x' > y' > z'$), and introduce a new one, with $y > y' > \text{all other variables}$. With the respect to this new ordering, the left hand side of (6) has leading monomial $yy'$. Thus, the right hand side also must have leading monomial $yy'$. Therefore, none of the homogeneous linear polynomials whose squares appear on the right hand side of (6) can contain the variable $y$ (because the square of any such polynomial would contain $y^2$, and thus the leading monomial of the right hand side (6) would be $y^2$ (here we are using again the fact that the degree of the sum of some positively led polynomials is always equal to the highest of their degrees)). But this means that none of the squares on the right hand side (6) can contain the monomial $yy'$ (because such a monomial could only come from a $y$ inside the square, but we have ruled out this possibility). Therefore, the coefficient of $yy'$ on the right hand side of (6) is $\sum_{j\in J}2a_jb_j\cdot 2A_jB_j$. This is divisible by $4$. The coefficient of $yy'$ on the left hand side of (6) is not divisible by $4$. Contradiction.
Anyway it still keeps the question open whether we are in more luck if we require $R$ to be a $\mathbb Q$-algebra.
EDIT: I think that even if $R$ is supposed to be a $\mathbb Q$-algebra, then your answer is No. Let me try to prove it:
Replace $\mathbb Z$ by $\mathbb Q$, and "integers" by "rationals" throughout the above. We can still get to (6), but we don't get the contradiction through divisibility by $4$ anymore.
Consider (6) again. I have showed that none of the homogeneous linear polynomials whose squares appear on the right hand side of (6) can contain the variable $y$. But the same argument works for any other variable instead of $y$ (just consider the lexicographic order where this variable is higher than all others). This shows that none of the homogeneous linear polynomials whose squares appear on the right hand side of (6) can contain any variables. In other words, these squares are $0$. This simplifies (6) to
(7) $xx'+2yy'+zz' = \sum_{i\in I} \left(a_i^2x+2a_ib_iy+b_i^2z\right)\left(A_i^2x+2A_iB_iy+B_i^2z\right)$
$ + \sum_{j\in J} \left(a_j^2x+2a_jb_jy+b_j^2z\right)\left(A_j^2x'+2A_jB_jy'+B_j^2z'\right)$
$ + \sum_{k\in K} \left(a_k^2x'+2a_kb_ky'+b_k^2z'\right)\left(A_k^2x'+2A_kB_ky'+B_k^2z'\right)$.
Unless the sum $\sum_{i\in I} \left(a_i^2x+2a_ib_iy+b_i^2z\right)\left(A_i^2x+2A_iB_iy+B_i^2z\right)$ on the right hand side of (7) is identically zero, it contributes at least one of the monomials $x^2,xy,xz,y^2,yz,yx,z^2,zx,zy$ with nonzero coefficient to the right hand side of (7), and no other term on the right hand side of (7) can kill this monomial. But this is impossible, as none of these monomials appears on the left hand side of (7) ! Thus, the sum $\sum_{i\in I} \left(a_i^2x+2a_ib_iy+b_i^2z\right)\left(A_i^2x+2A_iB_iy+B_i^2z\right)$ must be identically zero. Similarly, the same holds for the sum $\sum_{k\in K} \left(a_k^2x'+2a_kb_ky'+b_k^2z'\right)\left(A_k^2x'+2A_kB_ky'+B_k^2z'\right)$. Now (7) simplifies to
(8) $xx'+2yy'+zz' = \sum_{j\in J} \left(a_j^2x+2a_jb_jy+b_j^2z\right)\left(A_j^2x'+2A_jB_jy'+B_j^2z'\right)$.
Now, the coefficient of $xz'$ on the right hand side of (8) is $\sum_{j\in J}a_j^2B_j^2$. But the coefficient of $xz'$ on the left hand side of (8) is zero. Thus, $\sum_{j\in J}a_j^2B_j^2=0$. This means that every $j\in J$ satisfies either $a_j=0$ or $B_j=0$. Similarly, every $j\in J$ satisfies either $b_j=0$ or $A_j=0$. Therefore, every $j\in J$ must belong to one of the following pigeonholes:
Pigeonhole 1: $j$'s satisfying $a_j=0\text{ and }b_j=0$.
Pigeonhole 2: $j$'s satisfying $B_j=0\text{ and }b_j=0$.
Pigeonhole 3: $j$'s satisfying $a_j=0\text{ and }A_j=0$.
Pigeonhole 4: $j$'s satisfying $B_j=0\text{ and }A_j=0$.
Any $j$ lying in Pigeonhole 1 can be removed from $J$ without invalidating (8) (because if $j$ lies in Pigeonhole 1, then the addend corresponding to $j$ on the right hand side of (8) is zero and contributes nothing to the sum). Similarly, any $j$ lying in Pigeonhole 4 can be removed from $J$ without invalidating (8). Thus, what remains of (8) is
$xx'+2yy'+zz' = \sum_{j\in \text{Pigeonhole 2}} \left(a_j^2x+2a_jb_jy+b_j^2z\right)\left(A_j^2x'+2A_jB_jy'+B_j^2z'\right)$
$+ \sum_{j\in \text{Pigeonhole 3}} \left(a_j^2x+2a_jb_jy+b_j^2z\right)\left(A_j^2x'+2A_jB_jy'+B_j^2z'\right)$
$= \sum_{j\in \text{Pigeonhole 2}} \left(a_j^2x\right)\left(A_j^2x'\right) + \sum_{j\in \text{Pigeonhole 3}} \left(b_j^2z\right)\left(B_j^2z'\right)$.
This is absurd.

