That so totally depends on your Mac which Windows Version is supported. Win 10 is supposed to have kinda the same requirements as Win 7 and should ran OK with 4GB.
However, please keep in mind that for Win 7 one needs drivers separately and your Mac needs also a USB Flashdrive.
Checking the Sys-Requirements according to the Mac you provided Data of:
- MacBook Pro, Mid 2012, 13": supports either Win 7 (32 AND 64bit or 10 x64)
- Needs Flash Drive w/ 16 GB
Install Windows 7 and earlier on your Mac using Boot Camp - Apple Support
Boot Camp - Apple Support
How to install Windows using Boot Camp - Apple Support
For installing Win 7:
- Either 32 or 64 bit you´ll need to download separately the drivers from the first article (table below)
- Win 10 does not require this and can be installed somewhat easier
Win 10 is a rolling release and might habe some sever changes over time which COULD but not HAS to result in some problems, win 7 won´t be supported after 2020. Cheers.