NOTIFICATION : this answer is valid for an uniform continuity on the lines, i.e. the below $\delta_x,\delta_y$ are independant of the choice of the horizontal/vertical line.
Let $(x,y)\in I^2\setminus A$ and $\varepsilon>0$. By hypothesis, there exist $\delta_x,\delta_y>0$ such that
$$|x-x_0|<\delta_x\Longrightarrow|f(x,y)-f(x_0,y)|<\varepsilon/2\quad\quad\forall y\in I$$
$$|y-y_0|<\delta_y\Longrightarrow|f(x_0,y)-f(x_0,y_0)|<\varepsilon/2\quad\quad\forall x_0\in I.$$
Now, as $A$ is a dense set, we can find $(x_0,y_0)\in A$ such that
Then we have
As $\varepsilon$ was arbitrary, we've shown that $f(x,y)=0$. As $(x,y)\in I^2\setminus A$ was arbitrary, we've shwon that $f$ is identically zero on $I^2\setminus A$.