I have a trekking bike. Should I buy a road bike to train for a race?
Yes, you will need to have a road bike in order to properly train for a Triathlon. The ergonomics of a road bike a totally different to a mountain bike and you will therefore have to set aside some extra time for your body. You may at first feel discomfort when riding as you won't be used to the bike, but that'll go away very quickly.

As to whether you should buy a bike right now or not: I would say wait until autumn time when bicycle retailers will be cutting their prices in order to get rid of the current season bikes. I got my bike for £240 and it was Originally £600.