The RAM requirement for Facebook messenger is now 2GB, but does this only apply to Windows 10 installations? Would I still be able to install the Windows Phone 8.1 version of messenger on a older device like a Lumia 520 with only 512MB?
Facebook has developed its applications i.e. Facebook and Messenger differently for Windows Phone 8.x and Windows 10 Mobile. So you don't have to be worried about restrictions of W10M variant of Messenger while installing Messenger on a 8.1 device. I don't know whether it supports 520 or not as I never dealt with <1GB RAM devices but if 8.x variant does support lesser RAM devices, then you must be able to install it onto your 520.
NOTE: Since Windows 10 Mobile was made available to only those handsets which have:
- Denim update
- And at least 1GB RAM
Then what I think is that you can run Messenger app built for 8.x devices on a phone with RAM less than 1GB because for phones with higher RAMs and W10 compatibility there exist a separate Messenger app built for W10M.
EDIT: I now have found a link that will certainly help you out.