Let $A$ be a square right-stochastic matrix, so that $A$ has nonnegative entries and each row sums to unity.
For an invertible square matrix $B$, the product $A B$ is also right-stochastic. Must it be that $B$ itself is right-stochastic? I don't know, but the converse certainly holds since the product of right-stochastic matrices is right-stochastic.
The answer is no. As an example, take $$ A = \frac 12 \pmatrix{1&1\\ 1&1}, \quad B = \pmatrix{1 & 1/2\\ 0&1/2}. $$ $B$ is not right-stochastic, but $AB = A$ is right-stochastic.