Yes. We provide convenience functions in the SDK to automatically generate mouse input from the stylus tip position.
Ideally your app can go from 3D stylus mode to 2D mouse mode, when the stylus approaches the 2D UI elements on the screen. The trick is to find the screen's coordinates in terms of the 3D model world. See Question/Answer = 'How do I get my 3D objects to appear fixed on the screen, even while the camera moves around?'. There is also a Develop Article code sample to demonstrate stylus control of a 2D UI component.