If the consumer is not a price taker, does she still set marginal rate of substitution equal to the price ratio? Consider some consumer who consumes good $x$ and $y$. The price of $x$ is fixed to be $k$. The price of $y$ is $c(y)$. The consumer's marginal rate of substitution is given by $\frac{-x}{y}$. If the consumer optimises and is a price taker, I know she should set the absolute value of this equal to the price ratio. However, her quantity demanded affects the price ratio, as her demand influences the price of $y$. So, does it still hold that she would set

$$\frac{x}{y}=\frac{k}{c(y)}$$

Or does this result fail since her quantity demanded has an affect on the price of $y$?
We have the utility function  $U(x,y) = Ax^ay^a$ and we want to solve

$$\max U = Ax^ay^a,\;\;\; s.t. xp_x + yp_y(y) = I$$

The Lagrangean is 

$$\Lambda = Ax^ay^a + \lambda [I-xp_x - yp_y(y)]$$

and the first order conditions are

$$\frac {aU}{x} = \lambda p_x$$
$$\frac {aU}{y} =\lambda p_y + \lambda y\frac{\partial p_y}{\partial y}$$

It follows that at the optimum

$$xp_x = yp_y + y^2\frac{\partial p_y}{\partial y}$$

or that

$$\frac{x}{y} = \frac{p_y}{p_x} + y \frac{\partial p_y/\partial y}{p_x}$$

But the previous expression is more interesting because it can be viewed as a quadratic polynomial in $y$, and be solved for its roots