First off, どなた means who and どちら where, which, who. (どなた can mean where in classical Japanese, but not in modern usage.)
Re Q1, a simple answer is that they are not interchangeable due to the difference in meaning. どなたさま is also possible, but sounds too polite to me.
Re Q2, どちら is usually suffixed by さま to mean who, as stated in the definition #2-ア. どちらさま sounds more polite than どなた.
Now back to interchangeability, when they are used to mean who, sometimes they can be swapped. From the linked entry:
- 失礼ですが、{どなた,どなたさま,どちらさま}ですか
- {どちらさま,どなた, どなたさま}もお忘れ物のないように願います」
All in the braces are possible in the above, but as already mentioned, どなたさま may be too polite.
Lastly regarding the rudeness, どちらさま can be used to mean who are you? when pronounced brusquely. どなた can be used in the same way, but my impression is that どちらさま is used in that way more often (mostly in fiction). In real speech, they are usually appended by ですか: どちらさまですか/どなたですか to ask e.g. who is calling.
Re examples,
- #1 is natural for whose pen is this?.
- #2 sounds odd probably because (1) これ does not match politeness of どちらさま and (2) pen may sound too trivial to use such a polite form. こちらはどちらさまのお宅ですか? may be used.
- #3 sounds unambiguously which pen is this? (which needs contexts to make sense).
So overall, どなた and どちらさま mean who and interchangeable to some extent. The latter is more polite and probably because of this, less versatile. I don't come up with a natural sentence where どちら alone means who.