Suppose that $M$ has a finite number of topological ends (https://en.wikipedia.org/wiki/End_(topology)), then this cannot be true. Since the number of topological ends of $M \# M$ is twice that of $M$.
An instructive example is as follows: if $M = \mathbb{R}^{2}$, then $M$ has $1$ end and the connected sum $M \# M$ is an infinite cyclinder $S^{1} \times \mathbb{R}$, in this space there are two "ways to travel to infinity" hence this space cannot be homeomorphic to $M$.
We sketch the proof. Denote by $e(X)$ the number of ends of $X$.
To prove the statement in general, Let $K_{n}$ be a sequence of compact subsets such that
- $K_{n} \subset K_{n+1}$ for all $n$.
2.$$\bigcup_{n \in \mathbb{Z}} K_{n} = M$$.
By definition, the number of connected components of $M \setminus K_{n}$ will be equal to $e(X)$ for $n$ large enough. Let $B$ be a topological ball in $M$, note that there exists $n$ such that $B \subset K_{i}$ for $i \geq n$. By throwing away the first $n$ subsets we may assume that $B \subset K_{i} \forall i$. We perform the connect sum $M \# M$ by gluing two copies of $M$ along $B$
Now the subsets $K_{n} \# K_{n} \subset M \# M$ are nested and exhaust $M \# M$ (i.e. satisfy conditions 1 and 2 above applied to $M \# M$) . On the other hand, for $n$ great enough the number of connected components of $M \# M \setminus K_{n} \# K_{n}$ will be equal to $2e(M)$. We have shown that $e(M \# M) = 2e(M)$