If I want to do a meta-analysis and one study reports the data on two subgroups of the same sample, is it possible to calculate a pooled odds ratio? Or am I forced to use 2 subgroups?
If you have the actual values, then pooling them into a single 2x2 table is the most direct way to estimate the "combined" data OR. However, if the sample sizes are different, then the data set with more cases will have the most weight in the resultant value. As Daniel Wright 's comment notes, you may wish to weight the two individual estimates in a way that does not reflect the sample size--it depends on your specific research question.
Most meta-analytic studies do use sample size (or a function of its inverse) as a way to weight the contribution of individual ES values into an overall estimate.