For an ellipse, one can rescale the coordinates so that the region becomes a disk and then sample in the way you mentioned.
However, in general sampling efficiently from irregular regions (or distributions) is a really hard problem. If the dimension is low and the region is not too crazy, you can find some hypercube $C$ which contains $D$ and sample uniformly from $C$ while rejecting draws that don't belong to $D$. However, if the dimension is high or the shape is too irregular, you end up throwing away the vast majority of your draws, which really limits the effectiveness of this brute force approach.
Instead, the common thing to use in practice is some variant of Markov chain Monte-CarloMarkov chain Monte-Carlo, which attempts to walk around the space in a random way. This is much more efficient to implement and by various ergodic theorems should converge to uniform sampling in the limit. Unfortunately, in practice it's very difficult to determine whether you've let it run long enough for the convergence to actually occur. Statisticians have developed a whole slew of heuristics for this problem, but it's very hard to say things rigorously.
Edit: InEdit: in fact, it is possible to sample uniformly from an ellipsoid in any dimension by taking an affine change of coordinates so that the region is a ball, sampling. You then sample the radius $\sim r^{n-1}$ and drawing. To determine the angle, you take $n$ independent draws from your favorite rotationally symmetricthe standard univariate normal distribution to determine. It turns out that the angle of the resulting vector will be equidistributed in $\mathbb{S}^n$, which you can use to choose an angle quickly. This example is a very special case which behaves very different from less symmetricbit magical, and not at all what you should expect for more general regions.