IFF proofs require proving both directions. Also, I don't think your proof is correct, as what you have just results $0$. Here is my suggestion:
$\rightarrow$ I.e. Forward direction. Assume $X'XA = X'XB$. As you said,
$$X'X(A-B) =0 \implies (A-B)'X'X(A-B) = 0 \implies (X(A-B))'X(A-B) =0$$ (why?) From AA^T=0 implies A = 0 we can conclude $$X(A-B) =0$$. From this you can get your result. In case you do not understand the link, basically, if $AA' =0$ then every element of $AA'$ is $0$, which means all the diagonal elements of $AA'$ are $0$, which implies the trace of $AA' =0$, but the $i$th diagonal element of $AA'$ is $x_i'x_i$, where $x_i$ is the $i$th row of $A$. All these elements being zero implies $A =0$ (why? each of these elements is a sum of squares, which implies each element is 0. Think about what equations we have from these diagonal elements).
$\leftarrow$ Reverse Direction. Assume $XA =XB$. What happens if you multiply both sides by $X'$ on the left?
For the second part, note that $(X'X)^{-1}X'X = I \implies X(X'X)^{-1}X'X = XI = X$. What happens if you multiply these by $X'$ on the left? Think about the formula you proved in the first part.