Dogs like any living thing can enjoy sex, but they also have the right to say no to sex just as much as any human partner.
You need to learn how to read basic dog body language so you can tell if they are liking what you are doing or not, before you even think about doing anything sexual with a dog or any other animal for that matter.
If done right and with the dogs consent/agreement to sexual interaction, it can be enjoyable for both of you, without them consenting or ignoring there wishes for you to stop if you do try something and they don't like it, then that would be cruel.
Hopefully you understand the two cases and can respect the dog enough to listen to what they tell you and act accordingly.