Yes, if you format the memory card, you will lose the contents. Have you tried accessing the SD card in another device (like in a PC with a card reader)? If so, you may be able to recover the files with an app like Recuva.
https
/www.piriform.com/recuva