You are compensating a closed-loop system, not jus tthe op-amp. DO NOT look just at the op-amps stability, look only at the whole system stability.
Poles and zeroes anywhere in the closed loop path will affect frequency response, whether they are located inside the op-amp circuit or elsewhere. For maximum gain-bandwidth product, you want to compensate the system at the dominant pole. If you try to first stabilize the op-amp by itself, then you will be introducing a larger pole that may NOT be the dominant pole in the LDO.
In any case, there are LDO circuits that try to make sure the dominant pole is the output capacitor, so that once you exceed a minimum sized cap, it will be stable for all loads.