Proctor's perception of a morally righteous person is one who is "right with God". He achieves this is the play because he is not rules by the rules of religion like the other Puritans. The objectives of the pastor and the magistrates and other ritualistic Puritans are to go to church, obey the rules, and say a certain number of prayers a day. Proctor is more concerned about relationship with God that religion for the sake of religion.
This affects his decision to tear up the confession because the confession was a lie. The only being who absolutely knew it was a lie was God. Proctor would not have his relationship with God stained any further. He longed for God's grace and forgiveness for his other sin and this moment of truth demonstrated a pure heart condition on Proctor's part. The magistrates were asking him to sin, thinking that what they were doing was right, but it wasn't.
Rebecca Nurse is similar to Proctor. I do believe her words were influential to him because she was holding him accountable when she heard he had signed a confession. She knew that wasn't in his character or perception of a morally righteous person. Her surprise helped motivate Proctor to tear up the confession.