Is it possible for an inflamed cervix to not be caused by sex or std?

Yes, somewhat. Other non-infectious causes of cervicitis can include intrauterine devices, contraceptive diaphragms, and allergic reactions to spermicides or latex condoms, so it is possible to have this without sex or std per say, but many of these causes still have to do with sex, as they are items people use during or are indirectly related to sex.