Let $X_1,X_2,\dots,X_n$ a simple random sample $$X_i\sim N(\theta,\theta^2)$$
I want to find a confidence interval for the mean using a pivotal quantity. I read this answer Confidence Intervals - distribution of a Pivot? and the pivotal quantity should be $$\frac{\bar{x}-\theta}{S/\sqrt{n}}$$
But I'm wondering if for this case I can use $$Y=\sum_{i=1}^nx_i\sim N(n\theta, n\theta^2)$$ Then my pivotal quantity will be$$\frac{Y-n\theta}{\theta\sqrt{n}}\sim N(0,1) $$
So $$P\left(-z_{\alpha/2}<\frac{y-n\theta}{\theta\sqrt{n}}<z_{\alpha/2}\right)=1-\alpha $$ $$P\left(\frac{Y}{n+\sqrt{n}z_{\alpha/2}}<\theta<\frac{Y}{n-\sqrt{n}z_{\alpha/2}}\right)=1-\alpha $$ Is this correct too?
your procedure is correct. But in a very simple and standard way, simply observe that
$$\frac{X}{\theta }\sim N(1;1)$$
thus
$$\frac{\overline{X}_n}{\theta}\sim N\left( 1;\frac{1}{n} \right)$$
which is a natural Pivotal quantity....the result is the same as yours (assuming $\theta>0$)