The only way to test for 512K RAM is to use System 2.0, Finder 4.1 or above. Then using About Finder will show you how much RAM is installed in the info box window. Unfortunately, a 128K won't boot from a disk newer than System 3.2, Finder 5.3. However, a 512K will, up to System 4.1, Finder 5.5. A 512Ke should boot up to System 6.0.5. So depending on what startup disks you have access to, that may tell you what you need to know.
You can open it up carefully without doing any harm, but you need a special long handled torx screwdriver, or make one. Let us know if you intend to do so and we'll walk you through it.
Another test is to press the interrupt switch on the left side-bottom of the Mac (as you face it), if one is installed. It won't tell you how much RAM is installed per se, but it will let you know if the ROMs have been upgraded. If you get a window with a prompt, instead of a sad Mac screen, that means the ROMs have been upgraded and a high likelihood that the RAM has been upgraded as well. If you get the sad Mac, the RAM may still have been upgraded.
Welcome to the wonderful world of vintage Macintosh!