There is a thing occurring in the overkill context of Lurie's Higher Algebra which seems related to this question.
Namely, in Ch 3.3, Lurie introduces a fairly general notion of "module for an algebra of an operad". More precisely, we fix the following data:
A unital operad $O$ (here "unital" means that for every color $C$ of the operad, there is a unique nullary $C$-valued operation). For example, $O$ could be the operad for unital magmas. I don't know how essential the unitality hypothesis is.
A "fibration of generalized operads" $C \to O$. We're supposed to think of this as a category $C$ with "$O$-monoidal structure", or an $O$-algebra object in $Cat$. For example, if $O$ is the operad for unital magmas, then any monoidal category acquires such a structure by restriction along the map from $O$ to the associative operad.
An $O$-algebra $A$ in $C$. I'm not 100% sure I'm unwinding the definitions correctly (Lurie has several subtly different concepts he denotes by "$Alg$" with various decorations, and I'm not straight on what's what), but I believe that when $O$ is the operad for unital magmas and $C$ is a monoidal category, then $A$ is just a unital magma object in $C$.
Given this data, Lurie defines a category of "$O$-module objects over $A$", denoted
$$Mod_A^O(C)$$
I don't have a great grasp on this -- part of the issue is that in fact, Lurie doesn't isolate this construction, instead jumping straight to the construction of this category plus a full $O$-monoidal structure (and even packaging it all up in a bigger construction which allows $A$ to vary), which requires his technical "coherence" hypothesis. (Caveat: Lurie doesn't prove that $Mod_A^O(C)$ is a category in general -- without the "coherence" hypothesis, it might just be some simplicial set. But I'll proceed under the assumption that even though coherence is needed to get an $O$-monoidal structure on $Mod_A^O(C)$, it's probably the case that $Mod_A^O(C)$ is at least a category in greater generality.) However, Lurie does say that
When $O$ is the commutative operad, we recover the usual notion of module over a commutative algebra $A$;
When $O$ is the associative operad, we recover the notion of an $(A,A)$-bimodule.
That second point really throws me, and bears repeating -- for Lurie, a "module over an associative algebra object" is neither a left nor a right module, but rather a bimodule (I hasten to add that he does develop the theory of left and right modules separately, without reference to this more general context). For example, Lurie's notion does not recover the notion of a group acting on a set. Lurie explains that the motivation for doing it this way (the idea of which I think he attributes to John Francis) is that he wants to have an $O$-monoidal structure on the category of $A$-modules -- and of course left $A$-modules don't generally have a monoidal structure, but $(A,A)$-bimodules do. I have no ideal whether the operad for unital magmas satisfies the technical "coherence" condition guaranteeing that $Mod_A^O(C)$ does in fact have an $O$-monoidal structure; if it doesn't, then the main motivation for introducing this notion evaporates and perhaps it ends up not being useful. But it's still there.
If I have the chance to unwind what this construction yields in the case of the operad for magmas and ordinary 1-categories, I will edit to add more. Or perhaps somebody more familiar with this stuff can chime in.