Cheat Engine is a legitimate open-source memory editor, and that is exactly why antivirus software flags it. Tools that read and write another process's memory look identical to malware from a scanner's point of view, so detection is expected rather than a sign you have picked up something bad.
The real risk is not the program but where you get it. Download only from the official project site — repackaged copies on download aggregators are where actual malware hides, and they trade on the tool's reputation.
And remember what it is for: single-player games you own. Using it in online games breaks terms of service and will get an account banned.