Hello belong, well it is/it isn't. Depends on, if you are just selling the body and upgrading to 50d or are you selling your lenses too? How much do you have to spend more on 50D?
Though the 50D is fancier then 500D, but do concider the option of spending the extra amount towards a better lens then the 18-55. I am just assuming that presently your funds will be insufficient for buying a descent lens (according to your style of shooting) if you spend it on 50D. Otherwise ..... you will know what to do
If you kindly enlighten us with your plans in the future concerning photography,, it will be easier for us to give you the best of our advice.
Everybody agrees that investing on a lens is a safe bet.
Good luck to you.