Barring unforeseen circumstances, chances are that you will not need the services of a lawyer, while visiting Dubai as a tourist. Although, should the need arises, you should contact the consular representative of your country immediately.
If you are in the UAE though exploring your options in setting up a business, investing in real estate or simply finding a job, then consulting a lawyer should be your number one priority. Even though English speaking people do not face a language barrier problem (English is widely spoken in the Emirates), being in a foreign country, by itself, presents challenges even to the best educated people.
Hiring a qualified lawyer will save you from a lot of headaches in the long run. There are a lot of reputable law firms and individual lawyers who can give you advice in a wide range of topics. They can represent you in court, interact with the relevant local authorities on your behalf and take care of all the legal formalities.