Yes its fine to put cucumber in your tank, dont leave it in longer than 48hrs or it starts to break up, cories will nibble away at it.
Dont know why your guppy would be aggressive towards the gourami, or try to eat your other fish, what other fish and how many of each do you have, have you tested your water to make sure there is nothing untoward there that could be stressing the guppy and making him aggressive?