Hairplayer: it's not commonly done but certainly 'possible'. Speaking with friends who've done that sort of thing (on embedded devices, not phones), the hardest thing is getting it all to fit together again, as well as being careful to not short circuit stuff as you solder the new module back in.
Best option: check out the manufacturer of the RAM component (either through the phone's spec sheets or the writing on the component itself) and select the most similar module (same model/line) with more space. Then, desolder, solder in the new chip and cross your fingers. I'm not 100% sure with Android but you may need to slightly modify the ROM as well (less of a problem if you chose a similar chip). It's a bit hit and miss and by no means an exact science, and generally turns out ugly.
If you're interested, check out the dd-wrt forums, these kinds of operations are relatively common on routers (similarly embedded devices). The big difference there is that there's a lot more space to work with there and the components are a little easier to access and more spaced out.