Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
There's nothing in the SDK and App Store terms, as far as I know, that prohibits it. But I don't believe you'll be able to detect other iPhones around you in any way. Perhaps one could use a multiplayer server which would connect nearby players by geolocating them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.