Let $G$ be the set of finitely generated groups up to isomorphism.
Now define $B$ and $C$ two finitely generated groups to be not discernable if one can find a finitely generated group $A$ such that $A\times B$ is isomorphic to $A\times C$. This defines an equivalence relation on $G$ (straightforward verification).
The questions I will ask are related to this post :
For groups $A,B,C$, if $A\times B$ and $A\times C$ are isomorphic do we have $B$ isomorphic to $C$?
In this post, from the counter-example for $(1)$ not every class is reduced to one (you can not always discern a group from another). From the counter-example to $(2)$ there are many classes (using the abelianization one can discern groups using edit 2). So the "non-discernability" is clearly a non-trivial relation (so this is different from both the finite groups case and the general groups case). I recall that we are in $G$ and hence all groups are finitely generated.
(3) Are there groups $B$ such that the "non-discernability" class is reduced to $B$ ? If yes, can we caracterize them ?
(4) Is the trivial group "non-discernability" class reduced to the trivial group? If not, can we caracterize groups within this class ?
($\infty$) Give invariants for the "non-discernability" classes.
I have a favourite paper. However, I have never had a chance to apply it until now!
The paper is Some odd finitely presented groups by Gilbert Baumslag and Charles F. Miller III. (Mostly I like the paper because of the title.) The paper, among other interesting things, constructs a finitely generated group $K$ such that $K\cong K\times K$ (Theorem D)†.
Therefore, $K\times 1\cong K\times K$, and more generally $K\times B\cong K\times (K\times B)$. Hence, there are no groups $B$ whose "non-discernability" class reduces to $B$. Not even the trivial group.
This answers (3), and part of (4). Groups in the "non-discernability" class of the trivial group are all finitely generated groups $Q$ with $Q\cong Q\times S$, $S$ some finitely generated group. Perhaps a good starting point for your reading would be the paper J. M. Tyrer Jones Direct products and the Hopf property, J. Austral. Math Soc. (1974), where they constructed the first finitely generated groups $Q$ such that $Q\cong Q\times Q$.
† See also J. M. Tyrer Jones Direct products and the Hopf property, J. Austral. Math Soc. (1974) and David Meier, Non-Hopfian groups J. London Math. Soc., (1982)