Yes you totally can. You can live by Stanford, attend the meetups/hackatons/events that all of the stanford students are going to, and help out with some of the entrepreneurial programs (SSE Labs, BASES, Think Outside, etc).
If you're not a student and don't know anyone who is, don't go to a campus event, unless it's explicitly meant for the public in general. It's sketchy. Events are for the Stanford community unless they say otherwise.