Yes, the "was" is grammatically necessary. While relative pronouns can sometimes be omitted in English (e.g. "the voice I heard" = "the voice that I heard"; "the man I saw" = "the man whom I saw"), they can not be omitted in German.
An example: "The man (whom) I saw wore a white shirt." = "Der Mann, den ich sah, trägt ein weißes Hemd."
See this page for more details and examples: https://www.lsa.umich.edu/german/hmr/Grammatik/Relativsaetze/relative.html (especially section VII. The relative pronouns wer, wo & was - this sentence is use (ii) of "was")
Technically, it's grammatically wrong, though most people don't distinguish between "which" and "that" in everyday speech. "That" is used for restrictive clauses (aka essential clauses); "which" is used for nonessential (or nonrestrictive) clauses.
This page explains the difference: https://www.grammarly.com/blog/using-that-and-which-is-all-about-restrictive-and-non-restrictive-clauses/
(A quick summary: nonrestrictive modifying phrases are always set off from the rest of the sentence with punctuation and add unnecessary/extra details about the thing being described, while restrictive modifying phrases provide necessary/specifying information about the thing being described and are not set apart from the rest of the sentence by punctuation.)
"A restrictive clause acts as an adjective to modify the subject of the sentence. The restrictive clause is essential to the sentence because it provides information that, if taken out, changes the subject of the sentence completely. A restrictive clause is always preceded by that. Here are a few examples:
The ring that she had custom-made was stolen from the vault. Circus animals that aren’t in cages scare me. Personal computers that utilize retina displays are great for graphic designers.
A restrictive clause is never placed between punctuation.
A nonrestrictive clause typically contains optional information on the subject that isn’t entirely necessary to the sentence. In other words, if you remove a nonrestrictive clause from a sentence, the subject of the sentence remains unaffected. A nonrestrictive clause is usually preceded by which (if a pronoun is used at all). Here are a few examples:
The ring, which was part of a custom jewelry set, was stolen from the vault. Circus animals, which sometimes make cute pets, are rather expensive. Personal computers, which were actually invented in 1964, have come quite a long way.
A nonrestrictive clause is usually placed between commas, dashes, or parentheses."
It seemed to me that there should be two commas "Alles, was er sagt, war richtig." It reminds me of U.K. (historically) lower-class sentence structures I've heard . . . "Everything what he said was right!" (Think back to Monty Python sketches, or cockney accents from My Fair Lady or Mary Poppins. "Or there's them what can't make up their minds." from the song "I love to laugh.")
The subject of the sentence is a noun phrase consisting of a relative clause: "alles, was er sagte" ("everything (that) he said"). Then the main verb follows in second position, immediately after it.
See this article about relative clauses: http://www.lsa.umich.edu/german/hmr/grammatik/relativsaetze/relative.html