Hm… Something broadly similar happened here once, and it turned out that I had one of the FLY_* environment variables set locally (on the desktop development machine).
$ export FLY_APP=env-override
$ fly m list
No machines are available on this app env-override.
$ unset FLY_APP
$ fly m list # takes the app name from `./fly.toml` now.
1 machines have been retrieved from app local-dir-app.
[...]
Another possibility is that it’s finding a fly.json or fly.yaml, which are allowed substitutes for fly.toml these days.