Yes, in principle they can. Because games run as ordinary software on ordinary hardware, someone with the right skills can read and modify memory, alter save files or rewrite game code — which is exactly how mods, trainers and cheats get made.
Online games push back with anti-cheat systems, and tampering usually breaks the terms of service, so bans are a common outcome.