Yes, this is possible!
In order to do this, you'll need to change a value in the mame.ini file.
If you're running the Polycade interface (aka PolycadeUI aka polyface), this will be located here:
The scanline filter is done through MAME's hlsl video settings. You can remove the scanlines by disabling these settings.
Open mame.ini with Notepad, and find the value "hlsl_enable". Change the 1 after it to 0. Save the file, and you're done.