A relatively free algebra $F$ has a free generating set (basis) $X$ such that any map $f : X \to F$ can be extended to an endomorphism of $F$. It is known that, in general the notion of rank of $F$ (as the cardinality of a basis of $F$) is not well-defined, that is, there are examples of relatively free algebras whose bases are not necessarily of the same cardinality.
Question:
What about relatively free groups? It seems likely that the rank of a relatively free group $F$ must not be well-defined in general. Surely, in some nice cases when, for instance, the abelianization $F/[F,F]$ of $F$ is a free abelian group, the rank of $F$ is well-defined.