Indeed you must add 1 after Mexico’s country code 52. You must also add Mexico City’s area code which is 55. But anyway, if you could connect then you are dialing the right digits. Texting should work the same way. If it doesn’t work it’s either because your current plan doesn’t allow international texting, or there is an incompatibility between the two wireless networks (yours and the one in Mexico). In any case I would call my wireless provider to inquire about this.
One other option you can try is to replace the starting plus sign with 00.