In theory yes but in practice, you shouldn’t. First a UPS that will support the power of a fridge will be quite large and expensive. Additionally, a fridge can hold its cold temperature much longer than the power the UPS will deliver.