Nemesis (hypothetical star) was a hypothetical star orbiting our sun at a distance of 1.5 light years. Though it's been pretty much disproved (except just possibly as a very cold brown dwarf) - that's through searching for it, not through theory. So at least 1.5 light years is stable in theory for a star so surely for a planet also.
As for actual planets, this seems to be the exoplanet with the record of the most distant orbit from its star, with a semimajor axis of 1,168 au (about 0.018 light years, 6.74 light days) and an orbital period of 33,081 years