I was beating a monster and one of my opponents played Wand of Dowsing and said I couldn't win until they had searched the discard pile, which took 20 minutes. Is that ok?

Not even a little. "Discard diving" as a stalling tactic is not in the spirit of the rules. If your opponent knew there was a specific card they wanted to play against you, they should have told you as they went into the discards so you knew they weren't just wasting time. You would have been perfectly correct to call reasonable time if it was clear they were just searching for something to play against you. In informal, friendly games, many groups allow a player to say, "I'm pulling the +10 monster enhancer to play on you," and count that as playing the card even if the dowsing player doesn't yet have it in hand, as long as the card is actually in the discards to be retrieved.