Does Matthew 18:15-17 tell us to totally avoid at all cost someone who has wronged us and the Church?
It’s relevant to include Matthew 18:18 in this passage because only lawful Church authorities have the God-given power to formally discipline wayward disciples. When one of the faithful goes astray and the Church publicly disciplines them, this can include banning the person from Holy Communion (interdict) or even excommunication.
Even in such severe cases, though, the Church does not ban the offending parties from any interaction with the Church. Honestly, those such disciplined still have a moral right to accomplish their Sunday obligation by participating in the Mass to the extent they can, in as much as they may decide not to do so.
Consequently, we see that these penalties are intended to be remedial, i.e., to get a wayward person to see the error of his way and repent. So, even when the faithful stray, the Church is called to emulate the Savior and seek them out, which Jesus makes very clear in the following verses in the parable of the lost sheep (Matt. 18:12-14).
On the other hand, we should not encourage or be led astray by the misdeeds of wandering sheep, and thus should regulate our interactions with them accordingly.