Can I just connect the pickit2 to the PCB and go ahead with read and write procedures or do I have to buy myself a so called 'Trenntrafo'?
I have to advise you not to do tinker with line voltages, if you post questions like that.
That said, if you connect your Pickit to a coffee machine powered off the mains, stuff will break. Probably your entire computer. You could run your laptop on batter, but and not kill your laptop, but you have a good chance of killing yourself.
You could theoretically power your machine with an isolation transformer (Trenntrafo) but then you'll have to either by a 2kW transformer or disconnected heating elements and motor, so you can get away with a smaller (and hence cheaper) one. What's a small isolation transformer called again? Oh yea, a wall wart! (Btw: a cheap isolation transformer can be made by connecting two halogen transformers, real ones; not electronic, back to back. Plus fuses, etc …)
By the way, 2kW are enough to kill you - even when they're isolated. Or 50W. Unless you want to debug something when the machine is running like a motor or relay you don't need an isolation transformer. Even then I'd recommend removing the part to test and test it in isolation. It's a good policy to keep one hand in your pocket.
For programming I'm, completely disconnecting the PCBs and powering them from a lab power supply. That gives me a safe power source with protection circuits for over voltage, over current, etc … in case I do something stupid on the PCB like shorting stuff out. It'll also neither kill me nor my equipment. And it's a lot cheaper than a 2kW transformer. You could probably get away with wiring a 5V USB charger to the PCBs you want to program. Then it's also safe to connect your computer to it. Put GND from the charger to -5V on the PCB and +5V from the charger to GND on the PCB. No warranty.
If in doubt, don't do it. If you're sure -- check again!