Absolutely.
Always ask for time.
The idea that you should always be answering on the spot was propagated by candidates through peer practice, not interviewers.
Interviewers don't expect you to answer on the spot.
Here's also a resource you might find useful for brainstorming question focusing specifically on the different techniques you can use:
Best,
Cristian
Hi,
Always take:
It's a bit more tricky with taking time during the case:
Best,
Vlad
Hi A,
Yes, this is fine untill you get stuck and just try to win some time while guessing. To ask for half a minute up to 1.5 min for thinking according to the type of question is OK but, surely, the faster you get insights and give a structured answer the better it is.
Best