The natural density is $0$. This is due to the function $\sigma(n)/n$ possessing a continuous distribution, i.e. there exists a continuous function $\Phi:\mathbb{R}\to \mathbb{R}$ such that for all $a<b$ real numbers one has $$\lim_{x\to \infty}\frac{1}{x}\#\Big\{1\leq n \leq x: a<\frac{\sigma(n)}{n} \leq b\Big\}=\Phi(b)-\Phi(a).$$ Taking any $\epsilon>0$ and considering only $n>\frac{1}{\epsilon}$ one sees that the natural density of integers $n$ such that $\sigma(n)=2n-1$ is at most the density of integers $n$ with $$-\epsilon+\frac{1}{2}<\frac{\sigma(n)}{n}\leq \frac{1}{2}$$ which equals $\Phi(\frac{1}{2})-\Phi(\frac{1}{2}-\epsilon).$ Now since $\Phi$ is continuous we see that taking arbitrarily small $\epsilon$ the density of your integers $M$ is smaller than any positive number so it must vanish.