The index of a perturbed Dirac operator on non-compact manifolds