The Imperius Curse mightn’t make someone give information.
The Imperius Curse basically turns its victim into a puppet, while also filling them with a feeling of bliss so they’re less likely to fight its effects. It’s never seen as being used to get information from someone, so it seems like it might not work in that way. (Barty Crouch Jr. did keep Moody alive under the Imperius Curse so he could get hair and information, but he seems to Imperius Moody to subdue him and it’s never said that using the Imperius Curse is how he got the information.)
Dumbledore also didn’t want to use force to get the information.
Harry suggests that Dumbledore use Veritaserum or Legilimency to get the memory from Slughorn. Dumbledore says no to both, for practical reasons that they wouldn’t work, as well as not wanting Slughorn to leave Hogwarts.
“But surely, sir,’ he said, keeping his voice as respectful as possible, ‘you don’t need me – you could use Legilimency … or Veritaserum …’
‘Professor Slughorn is an extremely able wizard who will be expecting both,’ said Dumbledore. ‘He is much more accomplished at Occlumency than poor Morfin Gaunt, and I would be astonished if he has not carried an antidote to Veritaserum with him ever since I coerced him into giving me this travesty of a recollection.
‘No, I think it would be foolish to attempt to wrest the truth from Professor Slughorn by force, and might do much more harm than good; I do not wish him to leave Hogwarts.”
- Harry Potter and the Half-Blood Prince, Chapter 17 (A Sluggish Memory)
Therefore, it’s unlikely he’d want to try any other way of forcefully getting the information.
In addition, Dumbledore avoided using Dark magic.
Over the course of the series, we never see Dumbledore resort to Dark magic to fight the Dark Lord. McGonagall refers to this when she and Dumbledore are outside the Dursleys’ house.
“I know you haven’t,’ said Professor McGonagall, sounding half-exasperated, half-admiring. ‘But you’re different. Everyone knows you’re the only one You-Know – oh, all right, Voldemort – was frightened of.’
‘You flatter me,’ said Dumbledore calmly. ‘Voldemort had powers I will never have.’
‘Only because you’re too – well – noble to use them.”
- Harry Potter and the Philosopher's Stone, Chapter 1 (The Boy who Lived)
It’s incredibly unlikely that Dumbledore would resort to using an Unforgivable Curse, especially when he’s fairly sure he has another way that would work.
Having Harry retrieve the memory was likely the best plan overall.
The way Dumbledore chose to retrieve the information not only avoided him needing to use magic that was against his “code”, but it also retained Slughorn as an ally. There was no drawback to doing it the way he had, so it doesn’t really make sense (both for someone who wanted to avoid using Dark magic and just as a practical matter) to try force first off.