They could if they wanted to, but I see no reason why they would want to. Cucumber is safe and non-toxic to dogs, but dogs generally like two tastes; meaty or sweet. Cucumber is neither.
The only benefit of feeding cucumber to dogs would be if the dog is overweight, you could chop them up and mix them with their regular feed to increase bulk without adding extra calories. But you better chop it up good because most dogs will sort out the bits, eat the nice ones and leave the cucumber.
Carrots are a much better bet for a low calorie supplement; being sweet, dogs are more likely to enjoy them.