Honestly I don’t think anyone in the Church really knows what the word pastoral means. Some think a pastoral approach is being nice, some think it is being cunning (creatively balancing two sides), some think it means accepting everybody, etc. Many people in the Church also do not know what prudence is.
To answer your question with what little details you give, I would say never abandon prudence. A person who is wrong is so regardless of intention, but intention dictates the guilt and gravity. To no surprise learning and practicing prudence (it is an acquired virtue) leads to adherence to teachings and no doubt a pastoral approach, whatever that may be. Your conscience is worth a lot, and plays a large part in how grave a certain action may be (to the extent that something which isn’t sinful in itself can be if your conscience told you it was and you still went through with it), and also could very well be a vehicle of grace. In times when you are balancing prudence and pastoral approach (whatever that may be), a sober conscience is not infallible but is probably the best tool you have.