Differentiating a conditional expectation: RBC models with uncertainty
As I noted in a comment, to consider non-trivially a derivative, we must have a non-constant function in the first place. So, in generic terms, we are looking at the conditional expectation function $E(X\mid Z)$ and not at the conditional expected value of $X$ given a specific value $Z=  z$. 

Then, $E(X\mid Z)=g(Z)$, i.e. it is a function of $Z$ only, not of $X$, so it appears that its derivative with respect to $X$ should be zero.  

But: the way the problem is formulated, we treat the $X$, ($A_{t+1}$ in the OP's example), as a decision variable. Namely as a variable for which we can choose the value that it takes. But this conflicts with the fundamental characteristic of a random variable, i.e. that it is not under our control and its actual realization is unknown.  By treating it as a decision/command variable, we effectively neutralize any aspect related to a random variable, the conditional expectation aspect in our case. And it is in that sense that we can consider the derivative "ignoring" the existence of the conditional expectation operator. 

Note that, for the problem laid out at the end of OP's question, if income $Y_t$ is known at the time of the decision for current consumption, then $A_{t+1}$ is also completely determined, there is nothing random/unknown/uncertain about it. This then allows, in a Lagrangian formulation, to treat $A_{t+1}$ also as a decision variable and consider derivatives with respect to it.