Merely providing links to an inaccessible site does not make your own site inaccessible. A conformance claim only covers the site (domain or subdomain) for which the owner claims conformance; it does not require you to fix the rest of the web.
However, if linking means embedding content from other websites, that external content can cause accessibility issues. In a regular WCAG conformance claim, you cannot exclude this external content; conformance claims are for full pages. For such scenarios, you may wish to provide a Statement of Partial Conformance - Third Party Content.
Another scenario is where an online shop uses an external payment process. If the buying process begins on your own site but requires the use of an external payment services to complete the purchase, that external part must also be considered when making a conformance claim. This is covered by the section Complete processes in WCAG 2.1.