Trusty Companion can be declared as an attacker only if another creature is declared as an attacker at the same time. Once it's attacking, removing the other creature won't cause Trusty Companion to stop attacking.

Artwork
Loading artwork…
Trusty Companion
Kaladesh · #33 · EN
Nonfoil—Foil—
Card rules
Vigilance
This creature can't attack alone.
3/2
It shows affection an automaton never could.
Uncommon · Illustrated by Jakub Kasper
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pioneer Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If a creature that can't attack alone also must attack if able, its controller must attack with it and another creature if able.
If you control more than one creature that can't attack alone, they can attack together, even if no other creatures attack.
Although Trusty Companion can't attack alone, other attacking creatures don't have to attack the same player or planeswalker. For example, Trusty Companion could attack an opponent and another creature could attack a planeswalker that opponent controls.
In a Two-Headed Giant game, Trusty Companion can attack along with a creature controlled by your teammate, even if no other creatures you control attack.