The te-form of the verb やる is やって. やれって is not a te-form but やれ (the imperative form of やる, which can conclude a sentence on its own) followed by って.
This って is a colloquial version of quotative-と, and it's used in relation to 言ってたぞ in the previous sentence.
死んだじいちゃんがいってたぞ。もしもおまえが女とであうことがあったらやさしくしてやれって。
≒ 死んだじいちゃんが「もしもおまえが女とであうことがあったらやさしくしてやれ」と言ってたぞ。
My dead grandfather was saying this: "If you should meet a woman, be kind to her."
See: