So I am building a project where I need to send an SMS message to an emergency contact (with GPS coordinates) after detecting an anomaly. How would I go about doing this? Is it possible to do this using a free app on the cloud?
You can use Twilio SMS which isn't free, but is inexpensive with this library. The same technique can be used for other, possibly free, services.
Note, however, that because of A2P 10DLC restrictions that are now in effect, you will likely have to go through a free, but sometimes lengthy, registration process to be able to send SMS through an API.
One alternative that may or may not work for your use case is a service like Pushover that uses an app instead of SMS.
I have not used it in some time, but it was possible to use IFTTT to send push notifications via it's own IFTTT app to phones. When I used it, Particle was more directly connected but now you would just use a Particle webhook to tell IFTTT what to do.