Hi,
The description of your symptoms appear to be proctalgia ani. While it literally translate to "pain in your anus", the persistence of your symptoms warrants a physical examination by a doctor.
The causes can range anywhere from an anal fissure (tear in your anus), to deep anal infections, to referred pain from somewhere else e.g. coccydynia / pelvic floor strain (from your weight lifting), and stress.
Statistically, this is unlikely to be cancer despite your family history but it is worthwhile getting your risk assessed accurately with a detailed history taking so that you can be counselled on when you should commence cancer screening. Take care.