Acceptability varies by specific beach and local regulations. Some Cancun beaches (especially family-oriented or resort zones) may restrict thong/g-string swimwear. Others (adult-oriented, certain public stretches) tolerate it.
Best practice: Ask your hotel concierge, check posted signs, or observe locals. When in doubt, choose a cheeky or Brazilian cut for a similar look with wider acceptance.