If they have language - I think they can tell you what gender they are, whether that matches that which they were assumed to be at birth or not.
If they don't - making an assumption from play is dangerous, and highly inaccurate. For example, my daughter today was playing with a tractor, and loves to get dirty, yet I wouldn't assume she will identify as a boy later on - if she does, thats okay with me. But I'm not going to assumed from some random playing.
Children are usually quite direct with their feelings, emotions, and what they are thinking - they have no social filter at a very young age, and often say what was on their mind. They don't know that it might be seen as "weird" for them to say "no, actually, I'm a (opposite gender)" - if it's what they feel, they'll say it.
Most trans people have known for a very long time before they are able to do anything about it. Heck, a lot of gay people know as children (and no, it's not about sex...they aren't too young to know). So why couldn't a trans child be possible?
3-4yrs, i can't see why they wouldn't be able to....