Why doesn't Nelly tell Catherine who the visitor is when Heathcliff returns back to Thrushcross Grange?
You need to re-read Chapter 10 to find the answer to this question. This chapter describes the Linton´s married life together and paints a picture of domestic bliss. Though Nelly notes that Edgar tried to do everything he could to make sure his wife was not crossed or irritated. However, one night, Nelly returns to the house bearing a basket of apples. Note the description and how it foreshadows problems to come:
It had got dusk, and the moon looked over the high wall of the court, causing undefined shadows to lurk in the corners of the numerous projecting portions of the building.
The "undefined shadows" of course represent the trouble that Heathcliff will bring with him, in spite of the "mellow" evening. Also note that when Nelly realises who it is, she is shocked, "uncertain whether to regard him as a worldly visitor".
With all of this omens that seem to predict trouble in the offing, Nelly goes in and does as Heathcliff commands her to - she tells Catherine that someone from Gimmerton is there to see her. Although we are not told, I think she tells Edgar the identity of the stranger because she is worried about the impact of Heathcliff´s return on Catherine. So, to answer your question, Nelly was just obeying Heathcliff´s orders, though she feels unsettled enough to inform Edgar to try to warn him of the potential bad effect of Heathcliff´s return.