I saw this expression as a title of a short documentary on Youtube and was wondering, because it makes no sense to me grammatically.
It is a correct sentence. Compare it to "You need not apply for this job.". It's the same thing, but with the "for this job" implied.
Historically this phrase was used in a context (classified ad, window of a shop) that made it clear what the undesired group was not to apply for. So a shop might have had a sign up saying "Irish need not apply".