Good question. If you are in a cafe, and connected to the free WiFi, would you know if the person beside you is on the same WiFi...

You do not give enough detail to answer the question but here are some ideas.

the WiFi Signal is broadcast out in a sphere. So anyone in that radius would be able to connect. I sometimes drive in front of my local coffee shop and connect from the street. The coffee shop does not know that I am connecting from the street.

If I had access to the router, it would show that a user had connected but not where I was. All you would know is that a user connected.

Google got in a bit of trouble when they drove their car around the neighborhood connecting to Open WiFi hotspots. They were able to triangulate the device as the car would drive in and out of range on various streets, and they were able to triangulate the data. Because they were "accidentally" also capturing the packets of data on their WiFi capturing device, this lead to the justice department to investigate. This does not help you as all it does it tell you where the router is.

So... If I was creative, I might try to block the signal from my WiFi in various directions while watching the router, and see when the user gets disconnected. Then you will at least have a direction.

If you google "MoochHunter" they have software for sniffing out moochers (LOL), BUT you need a directional antenna, which is similar to my idea, but here you can walk around with your laptop and triangulate their signal. All at a cost to you....

Really, just connect to your router, and enable WPA2 password protected security. Then only those that know the password can connect to your router. I would not recommend a complicated password as your friend will think you are crazy when they connect to your network.

Lastly, if you do want an open WiFi and you want to share, you SHOULD/MUST enable WPA2. Just name the open wifi passiscat or something that is easily understood. This will force all connected computers to encrypt the data as it passes along the network. And protect your valuable passwords and internet surfing. Otherwise your information will be available to all and most websites, can be side channeled into... google firesheep...FireSheep...

Open WiFi is never safe for anyone... If you connect to a router with no password, you should never log into a site. (This is why facebook, Twitter, and Google have options to force HTPPS/SSL encrypted connections now...)

Hope that helps.