No. Tyrion was not working for the Martells. He was working in the interest of House Lannister. Though he disliked his father, he never wanted to ruin his family and even lied to Oberyn, telling him that Gregor Clegane killed Elia Martell of his free will.