Thumbs down to the answers suggesting that it can't be done.
Road cycles CAN be ridden on grass and very easily (perhaps a thoroughbred racing bike might not be so good but most can), folding bikes are not bad bikes - indeed one of the first folding bike makes (Brompton) was one of the first to have full suspension, and in a cross america race its rider was the only one able to sign his name at the end - the others were suffering from arm damages and numbing from the constant riding. Folding bikes can be correctly geared to be as fast as any other bike in a similar price bracket / quality standard.
Anyway, take some of the other answer with a pinch of salt. Then work out if they actually answered the question at all.....
A roadworthy bike does not mean the style, make or model, it refers to its maintenance. So in this case the brakes should work (this is the number one) and should be efficient - that means that at a walking speed for example, the back wheel can lock up with full brakes applied (skid) and if (don't test this) full brakes are applied at the front you are in danger of being thrown over the handlebars (see why not to test that bit). The drive chain should work freely (chain, gears and gears changes) and the steering should be straight and free to move. Tyres should be blown up to about the correct pressure.
In other words working the way that it came out of a bike shop, and important is safe to ride.
Now as for the grass part of your question.
I'll assume then that this is not a full (or olympic distance) triathlon and given the 3km distance more of a fun / beginner event (these can still be competitive though) and the grass course is likely to be over playing fields or similar. From what I know of folding bikes the tyres are likely to be wide enough to cope with the grass (racing bikes with skinny tyres tend to sink into wet grass - not enough surface area to hold them up) and if the bike is folding while not an ideal set of gears it will have enough to give you options (low gear to get moving, high gear for full speed and ones in the middle to cope with terrain) - few people use all the gear options on a bike, maybe 5 or 6 favourite ones.
If you want to 'make do' - you could practice, if you know where the bike bit will be try going for a few practice laps round the field and get used to riding on grass, this will benefit you on the race
- I don't like answer that start of saying "no you can't do this", when in fact it is obvious that you can, though you might not win the race, but in a fun race that is not the goal for most people. Read the question answerers and understand what is being asked. Rant over -