40yo man experiencing on-off penis burning occasionally with anal burning. No discharge, no rash, no urine issues. What could it be?

Penis burning. Perhaps a prostate infection or another type of infection. Please see your doc who can test and help you. Peace and good health.