'... the rim ...' - What are you referring to here? If you can be more specific, that would help.
'... a short piece of metal piping.' - I'm not sure what you're referring to here. Are you referring to the piece of pipe that's 'attached' to the sink drain? If so, you'll need a special tool (or you'll need to improvise) in order to UNSCREW the drain (from the bowl-side of the sink) in order to remove the drain, and hence, this straight piece of piping. Again, if this is what you're referring to, when you install the new sink and/or drain, you may need Plumber's Putty as part of the install. Hold off on that for now until I/we understand exactly what you're doing.
WHen you 'come back' to us, go ahead and say what you did to lead UP TO the point at which you're stuck. This will assist in determining what it is you're trying to remove (or even install.)