Bathroom vanity instalation
As long as the drain is still in the cabinet for aesthetic purposes, and the pipe can still allow the water to flow downhill to the drain in the wall, you can do what you need. 

The p-trap is always under the tailpipe of the sink.