How can I replace a water pipe on the second floor without the need to damage the bathtub?
First of all, the water damage in your unit could simply be because the upstairs people aren't properly closing the shower curtain when they shower, not the result of leaking pipes.  

If there is a leaking pipe, you will not be going through the tub to fix / replace it - that would destroy the tub.  You'll be opening up the wall on the other side of the tub, or the floor under the tub, or more likely both.

As for tracing the pipes - if they're copper you might be able to use a metal detector but its generally most reliable to open the walls up and trace them.  You might be able to tell where the pipes are running by studying the basement where they enter the walls but that's still not guaranteed to help.