Yes, it is possible to detect rogue planets by observing distant stars and measuring the microlensing effect when a big enough object passes in front of them and increases their apparent brightness. If the rogue planet passes one of the observed stars, this microlensing effect will be a lot shorter than when any of the planets orbiting the star would pass in front of it.
So far, we have identified several candidate rogue planets, with the CFBDSIR 2149-0403 being the closest to our Solar system, roughly 100 light years away. There are however huge differences in estimates of how many are out there, these being somewhere between 2 to a 100,000 free-floating planets per each star in the galaxy. It should be noted though, that not all of these rogue planets are thought to have been ejected from the systems they formed in, but many might have been formed on their own, possibly in similar way to how stars are formed, and then orbit the galaxy independent of any other systems.
As for how far they have to be for us to be able to observe their presence, it's rather hard to give an estimate, because the most suitable telescopes for such tasks probably wouldn't be the ones with the highest radial resolution, but powerful yet wider angle telescopes that could monitor many thousands of stars at the same time, like for example the Kepler space observatory. Kepler's main mission was looking for habitable-zone Earth-like planets around distant star systems in our galaxy, but now that only two out of four reaction wheels are working, it might even end up being more useful for the search of rogue planets, sweeping the skies more frequently than it otherwise would have, if it could target more precisely. However, its future is yet to be determined, so let's not jump the gun on this one.