Yes, you can get the nios to execute code that is set in on-chip memory as part of the fpga initialisation - that is what the epcs boot code does.
For debug. I like to be able to read memory blocks out of embedded systems and do a hexdump display on some terminal. Repeated displays can give a good insight into what the code has done - and without affecting the control flow/target code as much as doing actual prints (but they are useful as well). I've written far too much comms protocol code where you can't stop on breakpoints (because the far end won't wait) and there aren't enough cpu cycles for printf.