Whether you lose weight or not, chances are that the dress is going to need some alterations. It may need to be hemmed, taken in, or even taken out in certain areas. My rule of thumb is to get the dress in the larger size because it is always easier to take the dress in than out. Meaning, you can always get rid of extra material, but it may be a little tricky at times to add in more material.
Another suggestion is to not wait until the last minute to achieve your target weight for the wedding. Start your weight loss plan early so you can get the fittings out of the way and avoid any last minute dress alterations.