I know this already has an answer, but there is no confirmation as of now and the description of the scene remembered me too much one from Battle Beyond the Stars, starred by a very young (1980) George Peppard.
In it, the bad guy threatens a peaceful and defenseless planet, delivers and ultimatum and withdraws(!) his fleet while he allows the population to think the offer, leaving only one ship1. The people in the planet give the only ship they have to the (apparently) most unexperienced youngster they can find so he gets them some help.
The guy leaves, escapes the "blockade" and begins searching allies and finds different oddballs that happen to have spaceships and nothing better to do than fight in another people's war, while at the same time meeting a girl and all of that stuff that usually happens when you wander the infinite space2.
The guy returns home with 5 or 6 allies, the blockader warns the baddie and the battle begins, there are fighting scenes both in space and on the planet, the later inside some kind of bunker caves. At some point a sonic tank forces the defenders to retreat but, by a happy coincidence two of the aliens are twin, psychic aliens who happen to have no ears. They defeat the tank but one (or both?) of them fall.
At this trailer appears the scene above related, but there is not much to see of the tank.
Side note: In Spanish the film was titled "Los 7 magníficos del espacio" (The Magnificent Seven from Space) so I guess there were seven heroes in the good side.
1All the ships are for one or two people, most.
2Except that no giant ape threw barrels at them.