The metal piece that came off is pressed into the end of the charger cord and glued with something akin to crazy glue. There are two small pins at the proximal and distal end that align it and hold it in place at the end of the cord. This part is the target of the magnet in the MacBook.
Policies at the genius bar have been liberalized over issues of power adapter safety. It is now easier to get broken power adapters replaced, even if not under warranty. It is not an automatic replacement, but ask them before you knock yourself out doing a home-made repair job.
Remember that Apple wants you to be a happy customer. Be professional and cordial and keep your composure. Customers who come in angry and ready to sue everybody will never be happy customers, so they get nothing.