Generally you can though you would need to bring your boarding pass with you to be able to reboard the plane. Don't stray too far from the gate though as once the passengers at the connecting point are onboard, they will be ready to close the door and depart.