We have on product in our shop where there is enough circuitry on the 5V bus such that the USB/Pickit can't power it all, so programming fails. Powering that product with it's normal operating source makes it programmable. The pickit is in Auto Detect mode, so it just announces that the target has it's own source, and turns off it's own power feed to the target.
The thing that you need to be careful of is to make sure that the target can run safely when powered up before the program is loaded. And, it you are using the icsp pins for I/O as well as programming, that whatever those pins do is happy being wiggled during program loading.