To be totally clear: no, the decomposition as a representation of $A$ and the decomposition as a representation of $B$ separately don't determine the decomposition as a representation of $A \times B$, because this is not enough information by itself to determine which irreducibles of $A$ pair with which irreducibles of $B$ in general.
The smallest counterexample is $A = B = C_2$ acting on a $2$-dimensional vector space $V$ such that, as a representation of either $A$ or $B$, $V$ decomposes as a direct sum of the trivial representation $1$ and the sign representation $-1$. This means that $V$ could be either $1 \otimes 1 + (-1) \otimes (-1)$ or $1 \otimes (-1) + (-1) \otimes 1$ (the $+$ here is a direct sum but I find writing direct sums and tensor products together annoying to read) and you can't tell which. You can construct a similar counterexample out of any pair of groups $A, B$ which both have non-isomorphic irreducibles of the same dimension.
What you can do instead is the following. If you understand the action of $A$, then you get a canonical decomposition of $V$ as a direct sum
$$V \cong \bigoplus_i V_i \otimes \text{Hom}(V_i, V)$$$$V \cong \bigoplus_i V_i \otimes \text{Hom}_A(V_i, V)$$
where $V_i$ are the irreps of $A$ and $\text{Hom}(V_i, V)$$\text{Hom}_A(V_i, V)$ is the multiplicity space of $V_i$. If instead of considering the multiplicity space we just write a direct sum of a bunch of copies of $V_i$ that decomposition is not canonical and not unique. The point of doing this canonically is that if the action of $B$ commutes with the action of $A$ then the action of $B$ naturally descends to a family of actions on each multiplicity space $\text{Hom}(V_i, V)$$\text{Hom}_A(V_i, V)$. Once you decompose each of these actions into irreps of $B$ then you've understood the entire action of $A \times B$; this is how you prove that result you cite about direct products. Of course you could also start with $B$ instead.