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 (the following): "If you should meet a woman, be kind to her."
See: