Warning: (YCor) the following argument is mistaken as was pointed out by Derek Holt: the assertion that the abelianization of a torsion-free nilpotent group is torsion-free is hopelessly wrong.
The answer is "yes" because every f.g. nilpotent group has a torsion-free finite index subgroup and because the abelianization of a torsion-free nilpotent group is torsion-free. I assume that by "rank" you meant the torsion-free (${\mathbb Q}$-)rank.