Let $M$ be a commutative monoid and let there be an action of $\mathbb Z$, i.e., a function $\mathbb Z\times M\to M$ such that for $r,s\in\mathbb Z$ and $m,n\in M$ we have: \begin{equation} \left(r+s\right)\cdot m=r\cdot m+s\cdot m\\ r\cdot\left(m+n\right)=r\cdot m+r\cdot n\\ r\cdot\left(s\cdot m\right)=\left(rs\right)\cdot m\\ 1\cdot m=m \end{equation} Then is $M$ actually an abelian group with inverses given by $\left(-1\right)\cdot m$?
Note that such an action would be extension of the natural action of $\mathbb N$ on $M$.
Let $M$ be the monoid $\{0,1\}$ under $\max$; denote the monoid operation by $\ast$, noting that $m\ast m=m$ for each $m\in M$. Define a $\mathbb{Z}$-action on $M$ by taking $r\cdot m=m$ for all $r\in\mathbb{Z}$ and $m\in M$. Let's verify that your axioms for a $\mathbb{Z}$-action hold; fix $r,s\in \mathbb{Z}$ and $m,n\in M$. We have:
So this gives a well-defined $\mathbb{Z}$-action. But $M$ is not a group, since – for example – $1\in M$ has no inverse.
This example generalizes to any commutative monoid $(M,\ast)$ such that $m\ast m=m$ for all $m\in M$. No such monoid with more than one element can be a group, but taking $r\cdot m=m$ for each $r\in\mathbb{Z}$ and $m\in M$ will satisfy your axioms for a $\mathbb{Z}$-action on $M$.