There are different types of surgery to remove the prostate. Whichever one you have is likely to cause erectile dysfunction to some degree, which can be temporary or permanent. You might be unable to get or maintain an erection or the erection you do get will not be sufficient to have penetrative sex.
There are treatments that can help to lessen the effects, such as pills, vacuum pumps and others. You do not have to just put up with erectile dysfunction!
When having anal sex your erection needs to be firmer than when having vaginal sex. Many men say that the treatments they have been offered for erectile dysfunction are not sufficient to allow them to have anal sex when they are the "top" / "active" or "dominant” partner.
If you are the receptive partner (bottom) during anal sex the sensations you feel after surgery will be different compared to before surgery. This is because much of what you felt before was due to your prostate being rubbed by your partner's penis. However, you can still get pleasurable sensations from anal sex from other nerves around the anus and rectum.
If your prostate is removed you will no longer be able to "cum". You can still achieve an orgasm, but your dick might not be erect when you do. This is called a "soft orgasm". As you can no longer "cum" it is also called a "dry orgasm".
Find out more about the effects of
Sources: This information is based on details contained in "Prostate Facts For Gay and Bisexual Men" published by Prostate Cancer UK and on the personal stories of some of the men attending the monthly meetings of the LGBT Walnut group.