How far out can the sun keep celestial objects revolving? Astronomers define the Solar System as the distance under the influence of gravity from the Sun.

I read that the Oort cloud is probably the farthest object that surrounds the sun. The sphere of this icy cloud is thought to surround the Sun at up to a distance of 50,000 AU, making its total diameter nearly two light years.

How far can the sun's gravity extend to hold celestial bodies around it? The Oort cloud may be the known farthest body but its edge doesn't mark the end of the sun's effective gravitational pull.
The suns gravitational pull extends unlimitedly far and, if the universe were otherwise empty, a body could orbit it (very slowly) at unlimited distance. 

However, the universe is NOT otherwise empty. The nearest other stars are about 4 light years from the Sun at the moment, so a body more than two lightyears away will typically feel equally strong attraction from other stars as from the Sun, and so will not really orbit the sun.

That's a bit of an over-simplification, because (a) the sun is not surrounded by other stars 4 l.y. away in all directions (here is a chart of nearby stars) so a body might orbit in such a way that it didn't pass between the sun and any of its closest neighbours; (b) not all stars have the same mass, many are smaller than the Sun but some (eg Sirius) much bigger, so their gravitational influences vary and (c) the stars are all moving, so that from time to time one comes quite a bit closer, disrupting orbits.