Newton's Second Law in vertical launch of a rocket 
Consider a rocket being launched vertically.

Let $T(t)$ denote the thrust from the engine and $M(t)$ be the total mass of the rocket at time $t$.
At $t=0$, $T(0)=M(0)g$ (so that the normal force due to the launch pad needs not to be considered).
The acceleration $a(t)$ of the rocket at time $t$ can be obtained (along with other variables like the ejection speed of the fuel that are less important to my question) from Newton's second law of motion:
$$T(t)-M(t)g=\frac{dp}{dt}=\frac{d(M(t)v(t))}{dt}$$
$$=M(t)\frac{dv}{dt}+v(t)\frac{dM}{dt}=M(t)\frac{dv}{dt}=M(t)a(t)\tag{1}$$
So it seems to me that in general, we do not need to consider the $\frac{dM}{dt}$ term?  But shouldn't $\frac{dM(t)}{dt}$ be non-zero if the total mass of the rocket is decreasing over time.
Or is it that the change in mass over time is accounted for by $M=M(t)$ alone already?
And when do we need we to consider the $\frac{dm}{dt}$ term in $N2$?
 A: Your second equation in $(1)$ isn't valid when the mass is changing, see here.
When you have a variable mass (or rather the mass of the body of concern is changing), you need to think carefully about the system on which you are applying the second law. Here are two ways to go about this:
At time $t - \delta t$, the rocket mass is $M(t) + \delta m$ and at time $t$ it is $M(t)$. Apply the second law to the system that is only the mass that will remain at time $t$, i.e. the mass $M(t)$. This mass isn't changing during this time interval. We can write
$$T(t) - M(t)g = M(t)\frac{dv}{dt}.\tag{1}$$
This equation is instantaneously valid during the entire motion of the rocket.
Now consider the same situation, but this time choose the system to be the entire rocket mass $M(t) + \delta m$ at time $t - \delta t$, including the mass $\delta m$ that will have been ejected by time $t$. This mass again does not vary during the time interval $\delta t$. The only external force applied on this system is the weight. Suppose the mass $\delta m$ is ejected from the rocket at a speed of $v_e$ relative to the rocket, and $M(t)$ picks up a velocity increment $\delta v$. The second law now states
$$-(M(t) + \delta m)g = \frac{1}{\delta t}\left[M(t)(v+\delta v)+\delta m(v -v_e) - (M(t)+\delta m)v \right].$$
As $\delta t\to 0$, we get
$$-M(t)g=M(t) \frac{dv}{dt} +\frac{dM(t)}{dt}v_e.\tag{2}$$
Here $dM/dt$ the rate of change of mass, not the rate at which mass is ejected, i.e. $\delta m$ was positive but $dM/dt$ is negative.
Comparing $(1)$ and $(2)$, you see that
$$T(t) = -\frac{dM(t)}{dt}v_e$$
so the ejection speed isn't unimportant after all. When $v_e$ is constant, neglecting the weight term and integrating $(2)$ yields the famous Tsiolkovsky rocket equation.
A: You can't cancel the $\frac{dM}{dt}$ term in this case. And no, $M(t)$ does not have the information of the change in mass. It just knows how much mass there is in the system given a time $t$. You need to consider the mass derivative term when indeed the mass of the system changes during the process you're studying.
A: The derivation of $F=ma$ comes from $F=\frac{\mathrm{d}p}{\mathrm{d}t}$. So if mass  of  system changes we can say $$F\neq m\frac{\mathrm{d}v}{\mathrm{d}t}$$ because it's equal to $m\frac{\mathrm{d}v}{\mathrm{d}t}+v\frac{\mathrm{d}m}{\mathrm{d}t}$ according to $F=\frac{\mathrm{d}p}{\mathrm{d}t}$.
