A lattice characterization of groups with finite torsion-free rank