This is possible in most cases. Whilst ordinarily you may only download an App if it is available, and even then you may only download the most recent version of that app, in a number of circumstances it is possible to download an app that is no longer available.
The first obstacle is that if it is no longer available, then you cannot find it in order to download it. They key is to find it on your purchase history section on the iTunes stores within iTunes. If it's listed there, you should be able to download it regardless of it's availability to new users.
The most common reason for an app to become unavailable is for the developer to not renew his yearly $99 developer program fee. This not only stops the developer from having access to the various tools etc, it also means that any apps they have in the store are removed. Obviously in these cases it makes no sense to cause unnecessary hassle for legitimate purchasers who downloaded the App when it was legitimately available, and so these people always have this back door to re-download.
I believe the same applies for Apps that are pulled for breaking rules, if you downloaded it and Apple remove it, they only remove it for new downloaders.
Of course, it is possible just less common that the app has been removed due to malicious behaviour that was not caught in the review process. In this case, then it's prudent to have access to it genuinely removed for good.