Is it possible to have longitudinal waves on a string?

No, because string is not stretchable. It can neither be compressed nor rarefied.