It sounds like a type of drum trap or P trap with C/O but I'm not sure by your description.
You should get a new P trap and hold it in place to see if there is room for it. If there is you should be able to cut the pipe, as long as it is not paper thin, and replace the old brass piping and install the new trap. You may need to replace the pop up. You will need a straight coupling to act as a desanco where you cut near the wall.