Hi,
I don't think we have enough to go on to be sure of a match.
Was Ernest married by the 1901 census or would he have been single?
There are almost 600 Ernest Cook on the 1901 census. If he was living in Yorkshire that narrows it down to 41.
The only Ernest Cook of the right age, to have a child in 1909 and living in Pontefract for the 1901 census, is
RG 13 / 4299 / 57 / 24
John J Cook, head, m, 42, tailor, Yorks, Kilburn.
Jane, wife, m, 46, Yorks, Pocklington.
Ernest G, son, s, 19, Yorks, Pocklington.
However, you would need a lot more information on the family to confirm or exclude this Ernest as being "yours".
I sugest you file this away until you have more information to go on.
Sue