It wouldn't explain the lines you're seeing. They almost look like interference.
But you can test your memory with memtest. Do min 8 passes. You can try them in different slots, and you can take it out to just one stick. Memory issues would make your system unstable. Causing freezes or crashing. Won't hurt to test though.
The lines you're seeing is either some kind of gpu issue (which you ruled out), problem with connection to the monitor (check cables), monitor itself, or, the power supply, and the circuit it's plugged in. Also can be nearby electrical devices like air conditioners, humidifiers. After checking cables (swap for another cable or connection), and hooking up monitor to another computer or laptop, you can try taking your computer to another room. If still happens, then you gotta check the psu.