There is evidence to suggest that some anti-inflammatory medications may help in preventing certain types of cancer. For example, regular use of NSAIDs like aspirin has been linked to a reduced risk of colorectal cancer. However, the use of these medications for cancer prevention should always be guided by a healthcare professional, as they come with their own risks and side effects.