Is it true that if I a have zero curl of the magnetic field, I will get a zero current density using Ampére's law? I know that on the surface of the conductor it doesn't have to be true (the current density is going to be infinite here), but is it true that using Ampére's law here is useless?
[Physics] Zero curl of magnetic field and Ampére’s law
electric-currentelectromagnetismmagnetic fields
Related Solutions
Your first equation, which is a mere definition for the current, applies to regular vector fields $\mathbf J$. It is not straightforward to apply it to Dirac delta-functions. If you consider a finite-size wire, when it is angled wrt $S$ the intersection is larger by a factor $1/\cos θ$ which compensates exactly the $\cos θ$ factor arising from the dot product.
Now for your second question. Let's start by writing the current density correctly for an infinitesimally thin wire placed along the $z$ axis (it is defined by equations $x=0, y=0$, hence the two delta-functions): $$\mathbf j=I δ(x)δ(y)\hat z.$$ Suppose the surface of integration $S$ is a rectangle in a plane $(x',y)$ that's tilted by an angle $θ$ with respect to the $(x,y)$ plane. Viewed from the side:
The normal $\mathbf n$ (along a $z'$ axis angled by $θ$ wrt $z$) has coordinates $(\sin θ,0,\cos θ)$ in the $(x,y,z)$ system. So $$\iint_S \mathbf j·\mathbf n\,\mathrm dS=\iint_S Iδ(x)δ(y)\cos θ\,\mathrm dS.$$
Then we have to express the delta-functions in $x'y$ coordinates. $y$ is unchanged. Equation $x=0$ becomes $x'\cos θ+z'\sin θ=0$, so $δ(x)$ is replaced by $δ(x'\cos θ+z'\sin θ)$. On $S$, $z'$ is always zero, so finally we have to calculate $$\iint_S Iδ(x'\cos θ)δ(y)\cos θ\,\mathrm dS.$$ Now, you should know $δ(k x')=\frac 1{|k|}δ(x')$, hence $$\iint_S Iδ(x'\cos θ)δ(y)\cos θ\,\mathrm dS=\iint_S Iδ(x')δ(y)\,\mathrm dS=I.$$ (Alternatively, express $\mathrm dS=\mathrm dx'\,\mathrm dy$ and substitute variable $x''=x'\cos θ$.)
The electric field inside the cylinder won't be exactly static, because the charges are accelerating in the direction perpendicular to their radius vectors and hence they will produce induced electric field whose lines of force will turn in circles inside the cylinder, the highest field being near the cylinder wall.
So the Ampere law is not really applicable, because there will be some displacement current which it neglects.
However, a good estimate of the magnetic field, even when there is some displacement current present, is usually possible to obtain by using the Biot-Savart law. For cylinder with surface current, it turns out that the magnetic field inside calculated that way is uniform and along the axis of symmetry.
Once you obtain that estimate of magnetic field value as a function of time, you can estimate the electric field inside the cylinder as well, from the Maxwell equation
$$ \oint \mathbf E\cdot d\mathbf s = -\frac{d\Phi_B}{dt}. $$
Then you can calculate flux of displacement current through any rectangle passing through the cylinder and apply the Maxwell-Ampere law to determine the correction to magnetic field at every distance from the axis.
Best Answer
Note Maxwell-Ampere's law
$$ \frac{1}{\mu_0}\left(\vec\nabla \times \mathbf{B}\right) = \left(\mathbf{J}_{\rm enc} + \epsilon_0 \frac{\partial\mathbf{E}}{\partial t}\right). $$
If ${\rm curl\,}\mathbf{B}$ is zero then the entire right hand side is zero also --- which means there is no net current density.
The question then begs whether the possibility that you have described can really exist. Because we know by Gauss' law applied to magnetism that
$$ \vec \nabla \cdot \mathbf{B} = 0,$$
we know all magnetic fields must curl. North poles must connect to south poles. Sure, magnetic fields can be locally uniform, but they must curl at some point. The only way that $\nabla \times \mathbf{B} = 0$ is if there is no magnetic field at all, if we are talking about the field at all locations in space.