For the first question, the rank of a free abelian group $G$ is exactly the dimension of the vector space $\mathbb{Q} \otimes G$. So if you're convinced that the dimension of a vector space is independent of the choice of basis, then the same must be treu for the rank of a free abelian group.
For the second question, we run a similar argument. The rank of $G$ (free abelian) is the same thing as the dimension of $\mathbb{Q} \otimes G$, and computationally this is because a basis for $G$ becomes a basis for $\mathbb{Q} \otimes G$. But what about a free group $F$? Well, a "basis" for this free group (by which I mean the generators) becomes the basis for the abelianization $F^\text{ab}$!
So if we have our favorite free group with generating set $X$, $F(X)$, then the abelianization $F(X)^\text{ab}$ will be the free abelian group with basis $X$, and then the tensor product $\mathbb{Q} \otimes F(X)^\text{ab}$ will be a $\mathbb{Q}$ vector space with basis $X$.
In particular, the rank of a free group (that is, the cardinality $|X|$) must be well defined! Since if we can write $F(X) \cong F(Y)$ then chasing through the above process we must have $|X| = |Y|$, since they become bases for a vector space.
I hope this helps ^_^