Thanks very much. Yes, that works perfectly. I moved the library folder into the sketch folder as you suggested, and it compiles perfectly. And then I deleted files that weren't necessary, such as the examples, the doxy file, etc., and it still works.
So now I can install the latest version of IRremote in the normal way, but use a local v2.8 copy for sketches that need it.
Can you clarify whether IDE v2 permits a portable installation by adding a "portable" folder? If not, is this being considered?