Let $M$ be a module over some ring $R$. Now let $C$ be a category such that: $Ob(C)=M$ and $Hom(m,n)=\{r\in R\mid rm=n$} where the composition of two morphisms $r:m\to n$ and $s:n\to t$, $s\circ r:m\to t$ is defined just as multiplication $s\cdot r$ on the ring.
Clearly the operation is associative and it is closed because $(s\cdot r)m=s(rm)=sn=t$, and we can take the multiplicative identity on the ring to be the identity morphism on each object. Does this mean a module implicitly defines a category?
Yes. Note that the construction you describe uses only the multiplication operations and not addition, so it works more generally whenever $R$ is a monoid which acts on a set $M$. The category you get is sometimes called the "action category" for the action of $R$ on $M$ (or more commonly, in the case that $R$ is a group, the "action groupoid").
Even more generally, there is a similar construction starting with a functor $F:C\to\mathtt{Set}$ from any category $C$ known as the category of elements of $F$. In the case that $C$ is a one-object category considered as a monoid, so such a functor is the same thing as an action of the monoid on a set, this is just the construction you describe.