I think it is necessary, but not sufficient for us to be able to write $\vec{A}=\vec{\nabla}f$, why? Well, because another condition must be specified at this point together with $\vec{\nabla} \times \vec{A}=\vec{0}$, namely that $\vec{A}=\vec{A}(\vec{r})$. That is to say that $\vec{A}$ is only position dependant. Otherwise, that is when $\vec{A}=\vec{A}(\dot{\vec{r}})$, given the curlessness of $\vec{A}$, won't allow us to write $\vec{A}=\vec{\nabla}f$, is my reasoning correct?
Note
The submitted link in the comments, says that if the domain is simply connected region, then it follows that $\vec{\nabla} \times \vec{A}=\vec{0}\implies \vec{A}=\vec{\nabla}f$ why? Because doesn't conservative mean that $\vec{A}=\vec{\nabla}f$?
My question is, is this true even if $\vec{A}=\vec{A}(\dot{\vec{r}})$?