JavaScript (ES7), 3837 bytes
-1 thanks to @Neil
n=>(Math.random()*n*-~n+2&~1~n+1|0)**.5+.5|0
How?
We essentially pick a random integer in \$\left[1\dots\sum_{k=1}^{n}k\right]\$ and then return the corresponding term in the sequence \$1,2,2,3,3,3,4,4,4,4,\dots\$ (this is A002024).
A more readable form of the formula is:
$$\left\lfloor\sqrt{2 \times\left\lfloor \operatorname{rand}()\times {n+1\choose 2}+1 \right\rfloor }+1/2\right\rfloor$$
leading to:
$$\left\lfloor\sqrt{2 \times\lfloor \operatorname{rand}()\times n\times(n+1)/2+1 \rfloor }+1/2\right\rfloor$$
where \$\operatorname{rand}()\$ is assumed to return a random value drawn from the uniform distribution in the interval \$[0,1[\$.