Um... so your friend said 'you can't see that far up" when you said it was probably a plane, but he thought he saw a UFO that far up? Right...
Your eyes don't really have a distance limit _per se_, but they do have a resolution limit. This is expressed as an angle.
Imagine two lines extending from your eye's lens to two objects. The angle at which those two lines meet at your eye is the angle we're talking about. Someone with "standard vision" ("20/20" vision in English measurements) has a resolution limit of 1 arc minute, 1/60 of a degree. Details in a scene that are closer together than this will not be "resolved" by the human eye.
An ordinary narrowbody aircraft like the 737 is about 100 feet long and the wingspan is about the same. To find the resolution limit you divide this by the distance and take the arctangent of the result:
atan(100/30000) = 0.2 degrees
That's about 11 arc-minutes, which is much larger than required for us to see it. In other words, not only should we be able to see the 737 at 30,000 feet, we also should be able to see a much smaller aircraft! Assuming normal vision, or vision corrected to be normal.
Now it is not quite this easy because the air between there and here scatters and bends the light. Still, an 11x margin leaves enough to allow seeing the 737 on a good day. Probably not a Piper Cub, though, not that Piper Cubs can get that high.
We can see stars because resolution limits don't apply in such high-contrast situations, where all we need is "light or no light". And yes, that's about photons. (But resolution limit keeps us from discerning that one "star" is really two stars very close together, or from seeing the disc of a star.) This works with airplanes too: If an airplane is a very different brightness than the surrounding sky we'll be able to tell "something's there" even if we can't make out the shape. It might be very difficult to notice in the first place though.
The people who noted that you can't judge distance accurately on an airplane at such heights are absolutely correct. Your eye's binocular vision is only good for distance estimates to about 10 or 20 feet; beyond that we rely on other visual cues to judge distance: A person is about "so high", so if they appear "that high" they must be so many feet away. A 737 at 30,000 feet looks about the same size as a 747 (230-250 feet long, 195-224 ft wingspan, depending on model) at 15,000 feet: They both appear about 10 seconds of arc long and wide. The details like the wing shape, four vs. two engines, and the 747's "hump" are well below your resolution limit, so you don't know which you're looking at, so you can't say that it's at one altitude or the other. People just say "30,000 feet" because they know that's around the range of jet transports' cruise altitude.
( And if someone says "I saw a UFO at 30,000 feet", that's even sillier, because if it actually was "unidentified" - whether it was an alien spacecraft or not, doesn't matter - then they don't know what it was, so they have *absolutely no clue* how big it was, hence *absolutely no way* to judge distance. )
By the way, "resolution" is a fundamental spec on a telescope or binoculars. It's just as important as magnification. For example, if you look at Saturn with a cheap telescope you will likely just see a blur. You'll be able to tell that it isn't circular the way Jupiter is, but you won't be able to see that that "noncircular" look is caused by the rings - you won't see the gap between the rings and the planet. And adding more magnification to such a 'scope will only give you a larger image of a blur.