The idea is much older.
Watch Fassbinder
True. It is much older. As the wikipedia link op posted says the idea this reality could be an illusion goes back to ancient religious texts. But in science fiction the idea appears before fassbinder. Maybe starting in the 40s or 50s in a modern form. Philip k. dick has a lot on the subject for example.