In general, building on unpublished work of another author, which he may have told you in confidence, or you may encountered as a reviewer or by word of mouth or other informal means, is not an acceptable practice. Does the same apply if the author has uploaded his work on arXiv?
Here's a specific scenario: Suppose I submit a paper for review to a journal. The paper has results that could possibly be extended, however, the idea for extension is either not obvious or is not compatible with the theme of the paper, so I may plan to keep it for a later paper. If I put the paper on arXiv would it be considered ok if someone else extends my results? This would ruin the theme of the other paper I wanted to write with the extension.
If this happened to me it would make me uncomfortable, as if my confidence has been breached. I don't know if this feeling is justified. This feeling stems from my view of arXiv. My personal theory is that arXiv is an informal medium, unlike journals and conferences, and in that sense it is no different from other channels of informal communication. It allows for structured and faster dissemination of work (thus inform the ongoing work of others), in addition to establishing priority of results, but that does not grant it a formal status. I think an author should exercise restraint in extending results from arXiv, and apply the same standards that he would if he were to encounter the work through classical informal channels.
Of course, this is just my theory. I would like to hear what others have to say about this issue.
A few points to add -
Why publish things on arxiv? So that others know your results. This is only relevant if you can get others to start using your results. It'll increase your citation count and speed up progress. You run the risk of getting people who publish things you want to do in the future.
What to do about the risk? You can explicitly state you plan on doing X. If I'm already doing X, that might light a fire and get me to quickly finish. Or I might try to collaborate with you. If I'm not already doing X, would it be wise for me to compete with you? I don't know how far along you are, but you're almost surely ahead of me - would I really put in the effort to try to catch up with such a high risk of being scooped? No.
So if you tell people you plan to do an extension the real risk you run is that someone else who is already doing it might speed up their work, not that someone will come along and start up quickly.