How to add aditional actions to argument into environement

I'd use a command, rather than an environment.

\documentclass{memoir}
\usepackage{xcolor}

\usepackage{lipsum} % for mock text

\newcommand{\txtbook}[2]{%
  \par\addvspace{\topsep}
  {\centering #1\hfill\textcolor{red}{#2}\par}\nopagebreak
  \addvspace{\topsep}
}

\begin{document}

\txtbook{Del libro del Génesis}{9, 8-15}

\lipsum[1]

\end{document}

enter image description here


If you really wish to use an environment and your current interface, the following will suffice:

enter image description here

\documentclass{memoir}

\usepackage{xcolor,lipsum}

\newcommand{\txtred}{\textcolor{red}}
\newcommand{\atright}{\mbox{}\hfill\txtred}
\newenvironment{txtbook}{%
  \raggedright
}{%
  \unskip\par
}

\begin{document}

\lipsum[1]

\begin{txtbook}
  Del libro del Génesis \atright{9, 8-15}
\end{txtbook}

\lipsum[2]

\end{document}

One can add some spacing adjustments, if needed.