From the (few) sources available (such as this one at Engadget: http://www.engadget.com/products/acer/aspire/one/zg5/specs/), it would seem that the RAM controller chip in your netbook is capable of using only 2 RAM slots, each with up to 1 GBytes.
Since you already have 512 MBytes in one of the slots (soldered to the motherboard), following this reasoning you can only put in 1 GByte extra RAM in the other slot, giving the 1.5 GBytes total given in the reference above.
This being said, if you have a spare 2 GBytes DDR2 bar available, I would try it out and take it from there. The only thing I can see that would damage the RAM would be excess clock, but the Acer seems quite low in this respect.
Unfortunately, 4 GBytes seems impossible on this machine.
Hope this helps.
PS: if you find Ubuntu is a tad slow on this computer, it may also be due to the graphics card. A desktop with lower requirements such as LXDE, XFCE or Mate would probably help speed things up.