In a sense yes. It was integral to the story because it happened. But was it integral to obtaining data? IDK, maybe. The writers didn't come out in the movie and say 'We got OBL thanks to waterboarding Ammar!!!'
Personnally I think Ammar realized how dire his circumstance were and gave in...