How should one react when one's work is rightfully critiqued during a conference presentation? When somebody presents the paper, the attendees ask questions about the paper. But what if they raise a legitimate objection when they ask about our work and we know that they are right? Should we accept that or should we defend ourselves?  

I ask this, because recently I attended a conference, and in one presentation I saw an important mistake on one of the presentations' algorithms. But he denied my reasons, and both of us knew that my reasons were legitimate.
Should we accept that


Yes.

If somebody points out a flaw in your work, be thankful. They are giving you free advice. Don't try to be right at all costs. Of course it's awkward when people point out major flaws in your work when there is an audience, but it's part of the game.

If you believe you are right, defend your point using objective arguments. If you know the critique is founded, accept it and try to make the best of it.