Yes you can leave and come back later if you get your hand stamped. But remember to bring your ticket back also.
I can't tell you the number of times I have seen people turned away because they didn't bring the ticket with them when they returned. There are signs stating that you need your ticket upon return but people must ignore the sign.