Watermelon nor pumpkin will treat worms. The seeds must be crushed in order for the cucurbitacin to be released in order to be effective. A chicken would have to eat a truck load of crushed seeds for the cucurbitacin to be effective.
Benzimidazoles are the way to go when worming chickens.