Yes; as long as your gate is open and your DS is on, anyone you're friends with can show up. See, wouldn't it have helped if afterwards you could leave that person a negative rating?That's why we're trying to start a dialogue with the staff about it. It would help all of us that play online.
In this particular case, if the 3ds is left closed, the person comes and goes before the 3ds is again picked up, you have no idea who it was, leaving you then to guess, which doesn't exactly bode well for whomever you've guessed, if it wasn't them.