I find this a very interesting sequence, not just because it's a bit different in the films to the books, but because it changed dramatically between Tolkien's first draft of the story, and the published version.
In published book, this section isn't told in the third person. Instead, it's recounted by Legolas and Gimli, to Merry and Pippin, on the morning after the battle.
The Bakshi film didn't cover that part of the book.
In the Jackson film, we see the whole action. Such is the nature of films, and I don't begrudge Peter Jackson that.
However, it's when we turn to Chapter XII of 'The War of the Ring' - part of the series of commentaries released by Tolkien's son Christopher, that bring together his father's notes that things get interesting.
In this, we learn of several distinct versions:
In the earliest outline, we have the following:
The Haradwaith try to fly. Some take ship back again down Anduin. But Aragon overtakes them and captures most of the ships. Some are set fire to, but several manned by slaves and captives are captured.' (The follows the passage about the Gondorian captives.) 'Aragorn embarks with men of South Gondor, the Shadow Host disperses, pursuing the Haradwaith about the vales.'
Later, however, we get a newer outline:
Many of the ships are stuffed with captives, and they are partially manned (especially the oars) by captives taken in raids on Gondor, or slave-descendants of captives taken long before. These revolt. So Aragorn captures many ships and mans them, though several are burned. He works feverishly because he knows that the doom of Minas Tirith is near, if he does not come in time. That night the Shadow Host vanishes and goes back into the mountain valleys, and finally disappears into the Paths of the Dead and is never seen again to come forth.
Next, we get a draft of the text, which talks about fighting the ships, but Tolkien struck out the whole page of that draft, and added a footnote:
No fight, but the Shadows [?flow into] the ships and all men leap overboard except the chained captives.
This version comes into the next draft text, after which Legolas describes what Aragorn said:
Now I will hold your oath fulfilled.
However, he says this, not to the King of the Dead, but to:
a tall figure of shadow.
It's only in the final version that we get the following:
And Aragorn spoke in a loud voice to the Dead Men, crying:
"Hear now the words of the Heir of Isildur! Your oath is fulfilled. Go back and trouble not the valleys ever again. Depart and be at rest"
And thereupon the King of the Dead stood out before the host and broke his spear and cast it down. Then he bowed low and turned away; and swiftly the whole grey host drew off and vanished like a mist that is driven back by a sudden wind; and it seemed to me that I awoke from a dream.
Let's dig into this a bit more...
Is there an explanation of why Aragorn didn't ask them to do more?
No. However, the first draft had them do more, and this was changed to them just drifting away. So it's clearly a conscious decision that Tolkien made.
Could the army have defeated Sauron?
No way!
Sauron is not human. He's a Maia. This is basically (in the words of Tolkien) an 'angelic' being.
The army are wraiths, capable of scaring men (and maybe orcs, but I'm not sure we know), but not much more. They don't fight. They just cause terror. This isn't going to work on Sauron.
Could Aragorn have forced them?
Not within the constraints of a prophecy. That is, the time would come when they gave Isildur's Heir a bit of help, after which he would release them. Aragorn, having promised to do so, couldn't himself betray his word.