Rehearsal marks _are_ just \markup that is aligned to barlines. See
"Text marks" (particularly in the 2.7 docs)
Except that they only are typeset above the topmost stave,
not above every stave in scores with multiples staves.
Continuing my own comment:
This can of course be customized, by adding the corresponding
engraver to the Staff context. A more serious limitation might
be that you cannot simultaneously typeset a \mark both above
and below the system (or stave), in contrast to text scripts
where you easily can do ^"above"_"below". Another problem is
that you cannot easily specify two different marks to appear
at the end of a line and at the beginning of the next line.