<p>How can I draw a 2D rubber band rectangle in DirectX? Preferable using C#.</p>

The classic way to do rubberbanding is to:
Draw the regular scene, i.e. the "background"
Switch to "XOR mode", where your pen will XOR the pixels already in the framebuffer. It is important that the mode here is XOR, since XOR is losslessly "revertable", unlike for instance an add operation.
While "rubberbanding":
Draw the rubberband rectangle in its current coordinates
On the next frame, draw the rectangle again, still using XOR, using its previous coordinates. This removes the rectangle, leaving the framebuffer intact.
Update the rectangle's coordinates
Details on how to do this "with DirectX" are a bit harder ... I believe DirectDraw, the "old school" way of doing 2D in DirectX is obsolete, so I guess you must be using Direct3D. Unfortunately I'm not sure on the details, there. It might be that you're out of luck with finding pre-defined functionality to do XOR drawing, and need to roll your own. Hopefully someone can provide better details on that. Apologies if you were already up to speed on the rubberbanding theory itself.