Let $\mathscr C$ be a 2-category. For each object $X$ in $\mathscr C$ suppose there is a category $\mathcal R(X)$, and for each pair of objects $X,Y$ in $\mathscr C$ there is an "action" functor $$ \rhd \colon \mathscr C(X,Y) \times \mathcal R(X) \rightarrow \mathcal R(Y) $$ which satisfies compatibility with the composition and unit of $\mathscr C$, i.e. the diagrams $$\require{AMScd} \begin{CD} \mathscr C (Y,Z) \times \mathscr C(X, Y) \times \mathcal R(X) @>{\mathscr C(Y,Z) \times \rhd}>> \mathscr C(Y,Z) \times \mathcal R(Y)\\ @V\circ \times \mathcal R(X)VV @VV\rhd V \\ \mathscr C(X, Z) \times \mathcal R(X) @>>\rhd> \mathcal R(Z) \end{CD} $$ and $$ \begin{CD} \mathcal R(X) @>{u \times \mathcal R(X)}>> \mathscr C(X,X) \times \mathcal R(X)\\ @| @VV\rhd V \\ R(X) @= \mathcal R(X) \end{CD} $$ commute.
Does this structure have a name? Or is it an example of something more general? The point is that $\mathcal R(X)$ is a left $\mathscr C(X,X)$-module category for every $X$, but these more general rules are still satisfied.
$\newcommand{\CC}{\mathscr{C}}\DeclareMathOperator{\ob}{ob}\DeclareMathOperator{\mor}{mor}\newcommand{\RR}{\mathscr{R}}$The "2-category" aspect is a bit of a red herring in my opinion. It may be easier to first consider the case where $\CC$ is a category, and $\RR(X)$ is a set for all $X$. But I'll do the case of 2-categories anyway.
Let $\mathsf{Span}(\mathsf{Cat})$ denote the 2-category of spans of categories. A 2-category can be seen as a monad in $\mathsf{Span}(\mathsf{Cat})$:
Let $\RR$ be a category and suppose it's equipped with a functor $p : \RR \to \ob\CC$, and let $\RR(X) = p^{-1}(X)$ so that (remember that $\ob\CC$ is discrete): $$\RR = \bigsqcup_{X \in \ob\CC} \RR(X).$$ Consider the span $x : \RR \to \ob\CC$ in $\mathsf{Span}(\mathsf{Cat})$ given by $\RR \xleftarrow{=} \RR \xrightarrow{p} \ob\CC$. Then your $\rhd$ and the relations it satisfies are exactly the data necessary to make $x$ into a left module over the monad given by $\CC$.
Summary: This is a special case of a left module over a monad in $\mathsf{Span}(\mathsf{Cat})$. If, as I suggested at the beginning, you had a category $\CC$ and a collection of sets $\RR(X)$, this would similarly be a left module over the monad in $\mathsf{Span}(\mathsf{Set})$ given by $\CC$ (without the funky condition on $\ob\CC$ that says it's a discrete category).
PS: In general, a monad in $\mathsf{Span}(\mathsf{Cat})$ is a category internal to $\mathsf{Cat}$ (general fact about monads in spans), a.k.a. a double category. I'm viewing 2-categories as special double categories here – I don't know if this is important.