You can drag it out of the side of the findeer window and get rid of the icon there, in the same way you delete an item from the dock. And you can put one back there the same way as you do in the dock.
Easy! Just drag it back. It behave just like the Dock.
You can even put programs in there and they will launch. I do this all the time. I have Photoshop in my Finder windows Sidebar. To edit a picture, I just drag it onto the sidebar Photoshop icon and Photoshop launches and opens the picture.