Does the main character in a short story need a name? My story gives lots of other details about the character.
Can you do this? Of course. There's no law against it. The Novel Police will not break down your door and arrest you for failing to give your hero a name.
But why do you want to?
If you have some good reason, then sure. Like, My protagonist represents all humanity, and so he has no name because he is a generic person and not an individual. Or, My protagonist has no name because, as I tell the reader in the first paragraph, he is keeping his identity a secret. Etc.
But if your reason is, Because I saw it in this other story and it seemed like a cool idea. Or, Because I can't think of a good name. I'd say, don't. Make up a name.
There are plenty of times when it is a good idea to break the conventional rules. Break the rules when it serves to make a point. Break the rules when following the rules creates a problem. But don't break the rules just so you can say, Look! I'm creative and original! I broke the rules! This almost never works.
Important characters in many books are left unnamed, but (in my opinion) it's a bit risky. Unless your narrative is gripping and fast enough to divert the attention of the reader away from the name, or lack thereof, it feels fake. 'Fight Club, for example, is a splendid example of an unnamed protagonist. You could also call your protagonist by their profession or a trait, if you find you need other characters to call out to your protagonist.
Check this out, it might be a similar question
You can manage without one, but I'd recommend against it, unless you have a compelling reason.
A protagonist without a name is often awkward to write, and certainly awkward to think or speak about. A character's name is a pretty basic, fundamental aspect of their identity; there's something weird and forced about deliberately avoiding revealing his name. There's also the simple fact that the reader expects to get a name; if the reader doesn't get one, he's going to think that's a little odd.
These are all things you can overcome, certainly in a short story that can stand a little weirdness. That might be worth doing - if you have a good reason for it.
That's what's happening in the examples some of the others have given:
- In Rebecca, the protagonist has no name; she's only known as "the second Mrs. De Winter." That emphasizes how her own name has become unimportant; her identity is being subsumed in her marriage, how she's constantly being compared and contrasted to Rebecca.
- In Fight Club, there's good reason to conceal the protagonist's name - there's a major twist involving it at the climax. It also represents how the character feels hollow, fading away, a nobody.
Those are good reasons to leave a character nameless. If you have a good reason, a short story can certainly bear that weight. But if you just don't have a name for them, or if having a nameless character is just an arbitrary decision, then you're probably better off choosing some name and avoiding the issue.
It's a lot easier to think of the character if s/he has a name, but it isn't strictly required. In Daphne DuMaurier's Rebecca, the first-person narrator is never named, and is only known as "the second Mrs. De Winter."
Some of the most beloved stories are fairy tales where the characters are not named. They're the princess, the wicked witch, the boy, the big bad wolf, and so on. (Aimee Bender writes some fantastic stories with unnamed characters.)
So no, names are not necessary. However, you'll have to evaluate for yourself whether naming your own characters will work better for your story.
Presently, the most talked about television show is the Star Wars series "The Mandolorian" which is about a member of the Mandolorian Culture and his adventures with a young member of the species to which Jedi Master Yoda belongs to. At time of writing, four episodes have been released and neither character has been named on screen and no allusion to a real name existing for future revalation has been named. Fans have taken to calling the titular character "Mando" when refering to him. Even more bizarre is that, because George Lucas has refused to give much details on Yoda's species (still unnamed) and the fact that the young member of his race represents the first major development of the race in 20 years (the last being the revalation of a female member Yaddle in 1999's Phantom Menace) fans are refering to the child partner of Mando as "Baby Yoda" as a short hand for "Unnamed baby of the unnamed race of people Yoda comes from".
Of course, "The Mandolorian" was sold as a Space Western (the producers actually call it a "Space Samurai" film, more on this later) and with the Dollars Trilogy being a main source of inspiration. The trilogy is a series of three movies portraying Clint Eastwood's character known to film fans as "The man with no name" as he was never given a real name in the three films.
The first entry of the Dollars Trilogy ("A Fistful of Dollars") was an adaptation of the Kurosawa Japanese Period Piece (Jidi Geki) "Yojimbo" which featured a similar plot only with Samurai instead of Cowboys. The character that inspired "The Man with No Name" was Toshiro Mifune's "The Ronin with No Name". This isn't uncommon. Many tropes and archtype characters in Samurai films have a similar Western counterpart and many Hollywood fans of Kurosawa felt this was the best way to share these stories with Americans. The Magnificent Seven was similarly adapted from the Seven Samurai. That said, one Hollywood director bucked this trend and decided to make an adaptation of a Kurasawa film "The Hidden Fortress" (about a Princess and her General leading an epic fight against Imperial forces... from the point of view of the comic relief) into a little sci-fi film called "Star Wars" (In case you were wondering why R2-D2 and C-3P0 were so prominent in the opening of "A New Hope" or where in the world Lucas got the word "Jedi" from).
These aren't the only works with similar names. X-File's persistent foes, the group known as The Syndicate, never had their real names revealed, save for the leader. The members were only known by descritive names such as "The Well Manicured Man", "The First Elder," "The Second Elder," and the personal foe of Mulder, "The Cigerette Smoking Man" (aka Cancer Man aka Morely Man(prefered fiction brand "Morely" of his trade mark addiction. The name comes from a prop shop that specializes in prop generic name packaging that looks like real products). Additionally, there were two informants to Mulder in the series from within the Syndicate known only by false names they gave to Mulder, Deepthroat and Mr. X (the former was derrived from the real life informant on the Watergate scandle and the later was named for the X shape of Duct tape Mulder would tape to his window when he needed to contact Mr. X). There is some argument of main character status, but one episode of titled "Musings of a Cigarette Smoking Man" purports to be the (mostly true, but we don't know where the fictional parts occur) back story of the titular character... and never once uses his real name in the course of the story (we do learn he wrote a novel about his life, with his fictional self named Jack Collette and his pen name as Roman A. Clef. The former is definitely not his name as the later is a pun on "Roman à clef" which is a fictional character who represents a real person. CSM uses the Roman à clef Roman A. Clef to write about Jack Collette who is a Roman à clef of Roman A. Clef... which is a Roman à clef for whoever the CSM really is.")