The trouble is because you assumed that the final velocity of the small block is $\sqrt{2gh}$. This is true only if the wedge was stationary (in a frame of reference that is inertial), then what happens is that that the normal force from the wedge on the mass completely balances $mg\cos\alpha$, leaving the component $mg\sin\alpha$ down the wedge as you said.
But the situation is a little more complicated now, because the wedge is moving simultaneously as the small block slides down. So the forces don't balance out as described in the previous paragraph.
One can look at it in terms of energy to gain a better idea. The earth-wedge-mass system is isolated, so its total energy is conserved. The wedge doesn't gain or lose any potential energy, so the only change in potential energy comes from the mass. The change is $- mgh$. This must be distributed to the kinetic energies of BOTH the wedge and the mass. That is,
\begin{align}
&\Delta K + \Delta U = \Delta E = 0 \nonumber \\
\implies & \Delta K_{wedge} + \Delta K_{block} - mgh = 0.
\end{align}
if the wedge wasn't moving at all, we would then have $\Delta K_{wedge} = 0$, so
\begin{align}
\frac{1}{2}mv^2 = mgh \implies v = \sqrt{2gh}
\end{align}
like you said. But we see that if the wedge was moving, it 'eats' up some of the potential energy that would otherwise have gone to the mass. In other words, the small mass' speed will NOT be $v = \sqrt{2gh}$ at the bottom.
Having identified the flaw in your argument, how do we solve the question? There are a few ways. You can draw your force diagrams, carefully balancing out the forces and finding the geometric relation how the position of the mass relates to the position of the wedge. This analysis is perhaps easier in the wedge's frame of reference, but then you would have to add a fictitious force as it is not an inertial frame.
But the easiest analysis would be in terms of energy conservation, like the equation I gave you. We have
\begin{align}
\frac{1}{2}MV^2 + \frac{1}{2}mv^2 - mgh = 0.
\end{align}
Now all you have to do is find how $V$ is related to $v$. This is simple from conservation of momentum and some trigonometry, try it.
(Edit)
I noticed after posting that you specifically highlighted the fact that $v = \sqrt{2gh}$ is with respect to the wedge. Lest you start pointing that out, this is not true, because the force the mass feels down the wedge is not $mg\sin\alpha$, because in this frame (wedge's frame, which is not inertial), there is the fictitious force.
To answer your question in short, yes, you have to consider the torque of gravity.
Suppose, the acceleration of the block (mass $m$) is $a$ (upward) and that of the pulley(mass $M$) is $a/2$.
Suppose, you displace the block by $x$, so the elongation of spring is $x/2$. Let the tension in left string be $T$ and in the right string be $S$.
Thus, $T = mg+ ma$. (Newton's 2nd law on the block).
$kx/2 - T -S - Mg = Ma/2$ (2nd law on pulley)
And, the torque equation is,
$kxR/2 - MgR - 2TR = \frac{3}{2} MR^2 \frac{a}{2R}$ ,
where the angular acceleration of pulley about point A is $\frac{a}{2R}$ (why?). (Note: it would be much easier to take torques about centre of mass of pulley, but since you used point A, I too did it)
Eliminating $T,S$ we get,
$a (8m + 3M) = 2kx - 2Mg - 4mg$
where $ a = -\frac{d^2 x}{dt^2}$.
The time period of the oscillation is $2 \pi \sqrt {\frac{8m+3M}{2k}}$, which is independent of $g$. Note: If you had calculated displacements from equilibrium, then the terms $2Mg - 4mg$ would have been absorbed in it. We can write $2Mg - 4mg =2kx_0$, where $x_0$ is the equilibrium elongation.
Best Answer
Using free-body diagrams and Newton's Laws one would proceed as follows: