The Halacha is (can someone source please? ) if a person has two ways to go someplace and one of them he will be exposed to an Averah, even if he wont do the Averah he is still a Rasha if he goes that way. If that is the only way then one may go but obviously still not do the Averah. So it follows in your case, if you would get the same benefits out of your surfing without having immoral ads, then you must install the ad-blocker. If this will however break your email or something (not that its very likely) then you do not have to.
All this however is only if you do not look at the immoral ads with intention. If you know you will look, then you must install it in anycase.