Yes, you can deduct a trip to Mexico for dental work. But, you need to document the travel for the trip that relates to the dental work done. Any additional costs of a vacation or pleasure nature would not be deductible. Make sure you have records of the work that was done that document the expenses that you are claiming.
Please see Trips in IRS Publication 502.