So first some definitions. Let $G$ be an abelian group, a basis for $G$ is a linearly independant subset that generates $G$. We say that $G$ is finitely generated if a basis for $G$ is finite.
Now there's an important theorem
Theorem: An abelian group is free abelian if and only if it has a basis.
So if $G$ is finitely generated then $G$ is free abelian. Now if $H$ is a free abelian group with a finite basis we define the rank of $H$ to be the number of elements in any finite basis for $H$.
So from all the above definitions, it seems that the notion of rank is defined for any abelian group that is finitely generated. However in my textbook Introduction to Topological Manifolds by John Lee the following is stated:
"we need to extend the notion of rank to finitely generated abelian groups that are not necessarily free abelian"
But by the theorem above, I don't see how any finitely generated abelian group cannot be free abelian. An abelian group $K$ that is finitely generated has a finite basis and so by the above theorem is free abelian.
What does the author mean in this case?
My apologies if by mistake I have misquoted/misunderstood any content from the above mentioned book (which I consider to be a really great book!)
EDIT: I incorrectly assumed that $G$ is finitely generated implies that a basis for $G$ is finite.