Yes. Mahact may use their mech ability on themselves.
Designer ruling (Dane Beltrami): Yes. Official LRR, FAQ, or later expansion text wins if it supersedes this ruling. Starlancer may be used after a player whose command token is in your fleet pool activates the mech’s system, spending that token to end their turn. The designer ruling is that Mahact may use this ability against themselves if those conditions are met.
Designer ruling (Dane Beltrami), not Living Rules Reference text. If a later official LRR, FAQ, Codex, or expansion clarification supersedes this ruling, the official text wins. Collected from “The Unofficially Official FAQ and Errata,” Twilight Imperium 4: Prophecy of Kings v 3.1.1 (Google Doc, last modified 31 January 2023), a compilation of answers verified by the designer and announced as designer-verified on r/twilightimperium (16 June 2021).