One way to do this would be to override BarLine stencil so that it will contain your markup:
\version "2.18.2"
barlineMarkup = \markup {
\whiteout
\pad-around #1
\vcenter
\column {
"Some text I want"
"next to the score"
}
}
customBarLine = {
\once \override Staff.BarLine #'stencil =
#(lambda (grob)
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
X RIGHT
(grob-interpret-markup grob barlineMarkup)
0))
}
{
\override Score.BarLine.layer = 1
c' d' e' c' \customBarLine \bar "|."
}