dir="rtl" or dir="ltr" is the correct form of telling the device of the text direction in an EPUB3. In EPUB2 you should use CSS rule "direction:rtl;".
You should use the dir="rtl" attribute if the majority of the text on that page is in Arabic, for all the English paragraphs you add dir="ltr". e.g.
PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="ar" xml:lang="ar">
...
<p class="test"> الأَبْجَدِيَّة العَرَبِيَّة</p>
<p class="test"> الأَبْجَدِيَّة العَرَبِيَّة</p>
<p class="test"> الأَبْجَدِيَّة العَرَبِيَّة</p>
<p class="test2" dir="ltr">Hello world!</p>
<p class="test2" dir="ltr">Hello world! 2</p>
This will validate perfectly and work on all EPUB3 supporting devices.