You have mentioned forex in subject and stock market in the title.
If you are asking about Qatar stock market (Now QE or Qatar Exchange), Yes, as an expatriate with valid RP, you can do the stock trading via registered stock brokers like the group, or Dlala.