In no way are you obliged to work longer hours than those you booked, but if the employer asks if you can, and you’re able to, it’s always appreciated by both them and us (and may well increase the likelihood of you being asked to work with the same employer again).
You will, of course, be paid for any extra hours you work. Simply continue your shift for the agreed extension and then, when the manager confirms you’re no longer needed on shift, you can clock out. Any additional hours you work will be covered in your time sheet.