\documentclass{article}
\usepackage[osf,p,nomath]{libertinus}
\usepackage{microtype}
\usepackage[pdfusetitle,hidelinks]{hyperref}
\usepackage[noend,nofamiliar,noeledsec,series={A}]{reledmac}

\usepackage[bidi=default,english]{babel}
\babelprovide[import=he]{hebrew}
\babelfont{rm}{Libertinus Serif}
\babelfont[hebrew]{rm}{Ezra SIL}
\newcommand{\texthebrew}[2][]{\foreignlanguage{hebrew}{#2}}
\newcommand{\textenglish}[2][]{\foreignlanguage{english}{#2}}
\usepackage{metalogo}
\Xparafootsep{$||$\ }
\Xarrangement{paragraph}
\Xafterlemmaseparator{0.5em}
\Xbeforelemmaseparator{0.25em}

\linenumincrement{1}
\firstlinenum{1}

% Here the reledmac settings for RTL
\Xwrapcontent{\textenglish}
\Xbhookgroup{\textdir TRT}
\Xlemmaseparator{[}%Will be reversed by Ezra SIL font

  \title{Editing right-to-left text}
\date{}
\begin{document}
\maketitle
\begin{abstract}
  In this example, we use Lua\LaTeX.
  After this introduction page, all the document will be in Hebrew, except some notes in English.
  So the apparatus will be typeset right-to-left, except the comment, which will be typeset left-to-right.
\end{abstract}


\newpage
\selectlanguage{hebrew}

\beginnumbering


\pstart
\edtext{בְּרֵאשִׁ֖ית בָּרָ֣א}{\Afootnote{Some comment (1)}}
אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃
\edtext{וְהָאָ֗רֶץ הָיְתָ֥ה}{\Afootnote{Some comment (2)}}
\edtext{%
 תֹ֨הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְהֹ֑ום וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם׃
וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י אֹ֑ור וַֽיְהִי־אֹֽור׃%
}{\Afootnote{Some comment on a long lemma (3)}}
וַיַּ֧רְא אֱלֹהִ֛ים אֶת־הָאֹ֖ור כִּי־טֹ֑וב וַיַּבְדֵּ֣ל אֱלֹהִ֔ים בֵּ֥ין הָאֹ֖ור וּבֵ֥ין הַחֹֽשֶׁךְ׃
\edtext{וַיִּקְרָ֨א אֱלֹהִ֤ים׀}{\Afootnote{Some comment (4)}}
 לָאֹור֙ יֹ֔ום וְלַחֹ֖שֶׁךְ קָ֣רָא לָ֑יְלָה וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר יֹ֥ום אֶחָֽד׃ פ
 \edtext{וַיַּ֤רְא אֱלֹהִים֙}{\Afootnote{Some comment (5)}}
 אֶת־כָּל־אֲשֶׁ֣ר עָשָׂ֔ה וְהִנֵּה־טֹ֖וב מְאֹ֑ד וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר יֹ֥ום הַשִּׁשִּֽׁי׃ פ

\pend
\endnumbering

\end{document}