Yes. Article 4 of the Saudi Law of Criminal Procedure explicitly states that an accused person may seek the assistance of an agent or an attorney to defend them during both the investigation stage and at trial. This means your right to legal representation begins from the moment you are under investigation — you do not have to wait until you appear in court.
As an expat, it is strongly advisable to contact a Saudi-licensed lawyer as soon as possible if you are questioned or charged. Language barriers and unfamiliarity with local legal procedures make professional representation especially important. Your embassy may be able to provide a list of lawyers who work with foreign nationals.
If you cannot immediately afford or locate a lawyer, make sure you understand that you are still entitled to one before proceedings advance. Article 4 also notes that the implementing regulations of this law set out further rights of the accused, so a qualified attorney can advise you on the full scope of your protections.
This is general legal information, not legal advice. For advice on your specific situation, consult a lawyer licensed in Saudi Arabia.