Generally yeah. Casual speedrunning and TAS is always totally fine.
If you're aiming for times on speedruning leaderboards, you'll need to see what the rules are for the specific leaderboard. Never ever use Emulators or TAS outside of when it's allowed for leaderboard submissions.
For leaderboards, take a look at the rules on speedrun.com, where they specify what you're allowed to use to run games. I always take a look at the rules before considering a speedrun to make sure I won't be cheating.
Edit: For Sonic Advance 2, you can only use mGBA or Bizhawk with mGBA core. RetroArch is considered cheating.