The R help manual cites the Fisher letter to the Australian Journal of Statistics.
If the observations in a $2 \times 2$ table are distinctly out of proportion (and indeed in other cases also) we may wish to set limits to the true product ratio, e.g. the observed table
$$ \begin{array}{cc} 10 & 3 \\ 2 & 15 \end{array}$$
gives a crude ratio of 25. How small could the true ratio be in reasonable consistency with the data? If the expectation in the four classes were
$$ \begin{array}{cc} 10-x & 3+x \\ 2+x & 15-x \end{array}$$
the true ratio would be $(10-x)(15-x)/(3+x)(2+x)$m and $\chi^2$ for the observations would be:
$$\chi^2 = x^2 \left( \frac{1}{10-x} + \frac{1}{3+x} + \frac{1}{2+x} + \frac{1}{15-x} \right)$$
so if $x$ were 3.0, $$\chi^2 = 3^2 (0.59286) = 5.3357$$ with one degree of freedom.
The exact probability of such a small sample of 30 giving 10 or more in the first quadrant is the partial sum of a hypergeometric series, and not easy to calculate for if $\xi$ stand for the theoretical product ratio, the frequencies of 0 to 12 in the quadrant will be proportional to the terms:
$$ 1, \frac{13 \times 12}{1\times 6}\xi, \frac{13\times 12 \times 12 \times 11}{1 \times 2 \times 6 \times 7}\xi^2, \ldots, \frac{13!12!5!}{(13-r)!(12-r)!(5+r)!}\xi^i,\ldots$$
It would not be too difficult, as in the exact test for disproportionality, to calcuate the last three terms for any chosen value of $\xi$, but for the ratio of these to the whole we would require the sum of the entire series or $$F(-13, -12, 6, \xi)$$ which would be best obtained by calculating all the terms and summing them, a process too lengthy to be recommended.
Using Yates' adjustment, however, we can at once find: $$\chi^2_c = (2.5)^2 0.59286 = 3.7054$$.
Further taking $x=3.1$ we have
$$ \chi^2_c = (2.6)^2(0.58717) = 3.9693$$
Interpolating for the tabular entry 3.841 it appears that $x=3.0501$ and the cross product ratio is 2.718.
So that it may be inferred from the data that the true cross-product ratio exceeds 2.718 unless a coincidence of one in forty has occurred, Similar limits can be set in both directions and at all limits of probability.
Best Answer
First, let's see if there are differences in the proportion working across the four groups A, B, C, D. (Data similar to yours.)
The low cell counts in groups C and D, trigger a warning message, putting the validity of the P-value into doubt. The version of 'chisq.test` implemented in R, allows for simulation of a more accurate P-value, showing a significant effect at the 5% level.
Significance barely at the 5% level does not invite extensive ad hoc tests. To avoid false discovery they should show significance at lower levels. Furthermore, it is not clear just which confidence intervals would be of interest. A look at the Pearson residuals to see if there groups that are strikingly different, possibly suggests comparing groups A and B. However, the level of significance there is unimpressive, especially if we protect against false discovery.
You have already said you know how to use 'prop.test' to get a 95% confidence interval for the difference of proportions in A and B.
I don't see a point in looking at other pairs of groups---especially not, in view of the low counts there. Maybe you would like to compare group A with the other three groups combined, but 'prop.test' can handle that.
If you had additional kinds of analyses in mind using confidence intervals, please be more specific, and maybe one of us can help.