Local cartesian coordinates on surface of sphere

The key point here is of course that this is done locally about a point defined to be the origin of the new coordinate system: as the book you've linked says, your equation for $$\text{d}z$$ keeps us on the surface of the sphere if we are displaced by small amounts $$\text{d}x$$ and $$\text{d}y$$ from an arbitrary point on the sphere. The book then goes on to choose this point to be the origin $$(x,y)=(0,0)$$ of this new coordinate system that you're defining on the surface of the sphere.

Thus, a small change in $$x$$ and $$y$$ very close to the origin would lead to:

$$\text{d}s^2 = \text{d}x^2 + \text{d}y^2 + \frac{(x \text{d}x + y \text{d}y)^2}{a^2 - (x^2+y^2)}=\text{d}x^2 + \text{d}y^2,$$

since $$x=0$$ and $$y=0$$.

The reason for the singularity at $$a^2 = x^2 + y^2$$ is a little more interesting: we would, of course, like a map which uniquely specifies each point on the sphere. However, the above map does not. The way to see that is to realise that in the above map, we consider a tangent plane to the origin, and imagine an $$xy-$$grid on this plane. We then "drop a perpendicular" from any point $$(x,y)$$ and we call the point that it touches on the sphere "$$z$$". Of course, this point is not unique! Both $$+z$$ and $$-z$$ could equally satisfy this condition.

Therefore, to keep our map unique, we choose $$z>0$$ with the understanding that such a map only uniquely specifies a point $$(x,y,z)$$ if you are in the northern hemisphere of the sphere (i.e. "above the equator"). The fact that the map "blows up" at the equator is just telling us that beyond the equator we cannot use it beyond this "boundary". If you want to define points in the lower hemisphere, you will need to define a new map.

Of course, there's nothing particularly horrible actually happening at the equator: in fact, what we call the equator depends on our point $$A$$ which is the "north pole". But then, with a sphere, one could always choose a different "north pole" $$A^\prime$$, and we would have a map with a different domain of validity. (It would cover a different hemisphere, but there could be overlap between this new map using $$A^\prime$$ and the old map using $$A$$.)

Such a singularity which can be "removed" using a different coordinate map is called a coordinate or removable singularity: our chosen coordinates are no longer valid beyond this curve. I believe this is very similar to what happens at the Event Horizon of a Black Hole, as the metric has a coordinate singularity there as well.

In the provided link, the author on page 36 states that the metric is locally Euclidean around the chosen point $$A$$ (the north pole). Following the author's orientations on figure 2.2, the coordinates of the north pole are $$A = (0,0,a)$$ Locally around this point then means that the $$x$$ and $$y$$ coordinates do not go far away from $$A$$, that is, far away from $$0$$. One can then say $$x\approx \epsilon, y\approx \delta$$, and re-express the metric by neglecting all terms of order $$\epsilon^2, \delta^2, \epsilon\delta$$ or smaller.

The mixed part of the stated metric then vanishes - see the numerator $$(xdx+ydy)^2 \approx \epsilon^2 dx^2 + \delta^2 dy^2 + 2(\epsilon\,\delta)\, dx dy \approx 0$$