Is it safe to drive I/O pins of an unpowered AVR ATmega328P?
You may be interested in EEVBlog's video about powering an MCU without connecting the power pins. If you drive the I/O pins on the MCU, you may end up powering up the MCU through its protection diodes. 

If, after the diode drop, your VCC ends up being below or above the minimum voltage required to drive your MCU (or draw more current than the internal diodes can handle), then it will not operate correctly. Of course, this is assuming your VCC is open circuit and not shorted to ground (or zero volts).

Here is a diagram of the equivalent circuit for your Atmega328p:



Note the diodes from ground to VCC.

Either way, the datasheet does not explicitly specify the exact behaviour of driving the Atmega328p from an I/O pin. 

However, it does say the absolute maximum voltage you can apply to an (non-nRESET) I/O pin is Vcc+0.5V. As mbrig pointed out in the comments, if you phantom power the chip, the diode drop will very likely cause the voltage on the I/O pin to be larger than Vcc+0.5V. 

The data sheet states that operating the ATmega328p outside of it's absolute maximum ratings can cause permanent damage so I would recommend against it.