Suppose that we are interested in comparing two approximately normal sampling distributions described by random variables $ \displaystyle \frac{Y_1}{n_1} = N(p_1,p_1q_1) $ and $ \displaystyle \frac{Y_2}{n_2} = N(p_2,p_2q_2) $, created from population distributions which are Bernoulli distributions.
Note that $Y_1$ represents the sum of successes in a sample set, and thus $\dfrac{Y_1}{n_1}$ represents sample proportions. For example, for any kth sample set of $\dfrac{Y_1}{n_1}$, we calculate sample proportion statistic, $\dfrac{Y_{1k}}{n_1} = \dfrac {1}{n} \sum\limits_{i=1}^n Y_{1ki}$, where $Y_{1ki}$ is $i$th sample in $k$th sample set of sampling distribution described by $\dfrac{Y_1}{n_1}$. Similarly for $\dfrac{Y_2}{n_2}$
We could then calculate CI as below, $$ \begin{align} Pr\Bigg( -z_{\frac{\alpha}{2}} \leq \dfrac{(\frac{Y_1}{n_1} - \frac{Y_2}{n_2}) - (p_1 - p_2) }{\sqrt{ {\frac{p_1q_1}{n_1}} + {\frac{p_2q_2}{n_2}} }} \leq z_{\frac{\alpha}{2}}\Bigg) = 1-\alpha \nonumber \end{align} $$
Assuming $\sigma$ unknown
Most of the times in reality, the population paramters are not known. So when the sample sizes $n,m$ are sufficiently large, we could use sample statistics ($\frac{\hat{p_1}\hat{q_1}}{n1},\frac{\hat{p_2}\hat{q_2}}{n2}$) in place of ($\frac{p_1q_1}{n1},\frac{p_2q_2}{n2}$). This results in further approximation of our confidence intervals. Thus when a sample is observed, we have statistics
$\hat{p_1} = \dfrac{y_1}{n_1} , \hat{q_1} = 1 - \dfrac{y_1}{n_1}$,
$\hat{p_2} = \dfrac{y_2}{n_2} , \hat{q_2} = 1 - \dfrac{y_2}{n_2}$,
Thus we could rewrite further as,
$$ \begin{align} Pr\Bigg( -z_{\frac{\alpha}{2}} \leq \dfrac{(\hat{p_1} - \hat{p_2}) - (p_1 - p_2) }{\sqrt{ {\frac{\hat{p_1}\hat{q_1}}{n_1}} + {\frac{\hat{p_2}{\hat{q_2}}}{n_2}} }} \leq z_{\frac{\alpha}{2}}\Bigg) \approx 1-\alpha \end{align} $$
When $n,m$ are small
This is where I am left without any further info I could not find online. When $n_1 < 30, n_2 < 30$, what do we do? Will it be t-distribution again just like for single population distribution? If so, how do we calculate degrees of freedom there?