I would like to prove (if it is true) that from the equation
$$\mathcal{D}(r)Ac=\mathcal{D}(c)Ar$$ where $A$ is a non negative $n\times n$ matrix, $r,c\in\mathbb{R}^n$ are positive vectors and the operator $\mathcal{D}$ applied to a vector returns a diagonal matrix that has that vector on the main diagonal, it follows that $$r=c.$$
I tried to rearrange the first equation, but I cannot prove that result. Any hint?
Of course, the OP did not get tired by explaining his question. Firstly, if $A=0$, then it is clearly false. Secondly, as he notes in a comment, the conclusion is not the one requested.
Proposition. Let $A\ge 0$ s.t. if $i\not= j$, then $a_{i,j}>0$. Then $r>0,c>0,D(r)Ac=D(c)Ar$ implies that $c=\lambda r$ where $\lambda>0$.
Proof. One has, $Ac=D(r)^{-1}D(c)Ar$, that is, for every $i$: $\sum_ja_{i,j}c_j=c_i/r_i\sum_ja_{i,j}r_j$.
Let $i$ s.t. $c_i/r_i=\sup_j(c_j/r_j)$. For this $i$
$\sum_ja_{i,j}c_j=c_i/r_i\sum_ja_{i,j}r_j\geq \sum_ja_{i,j}r_jc_j/r_j=\sum_ja_{i,j}c_j$. Then, for every $j$, $a_{i,j}r_jc_i/r_i=a_{i,j}r_jc_j/r_j$, that implies $a_{i,j}=0$ or $c_i/r_i=c_j/r_j$. Finally, for $j\not= i$, $c_i/r_i=c_j/r_j$ and we are done.