Obviously a necessary condition for \vec{B} to be the curl of a vector field is
\vec{\nabla} \cdot \vec{B}=0.
Then the vector potential is only determined up to the gradient of a scalar field. Thus one can impose one additional condition ("choice of a gauge"). In this case an axial gauge is chosen, i.e.,
\vec{\nabla} \times \vec{A}=\vec{B}, \quad A_x=0.
Then we have in Cartesian coordinates
B_x=\partial_y A_z-\partial_z A_y, \quad B_y=-\partial_x A_z, \quad B_z=\partial_x A_y.
From the last equation we get
A_y=\int_{x_0}^{x} \mathrm{d} x' B_z(x',y,z)+\tilde{A}_y(y,z)
and from the 2nd equation
A_z=-\int_{x_0}^x \mathrm{d} x' B_y(x',y,z) + \tilde{A}_z(y,z).
The first equation now reads
B_x(x,y,z)=-\int_{x_0}^{x} \mathrm{d} x' [\partial_y B_y(x',y,z)+\partial_z B_z(x',y,z)]+\partial_y \tilde{A}_z(y,z)-\partial_z \tilde{A}_y(y,z).
Now from \vec{\nabla} \cdot \vec{B}=0 we find
B_x(x,y,z)=B_x(x,y,z)-B_x(x_0,y,z) +\partial_y \tilde{A}_z(y,z)-\partial_z \tilde{A}_y(y,z)
or
B_x(x_0,y,z)=\partial_y \tilde{A}_z(y,z)-\partial_z \tilde{A}_y(y,z).
This equation we can satisfy by setting
\tilde{A}_y=0, \quad \tilde{A}_z(y,z)=\int_{y_0}^{y} \mathrm{d}y' B_x(x_0,y',z).
Putting all together we get
A_x=0, \quad A_y=\int_{x_0}^{x} \mathrm{d} x' B_z(x',y,z), \quad A_z=\int_{y_0}^{y} \mathrm{d}y' B_x(x_0,y',z)-\int_{x_0}^x \mathrm{d} x' B_y(x',y,z).
This is what's claimed in the OP.