You may apprehend and hold a person that commits a felony IN YOUR PRESENCE. Yes, you can use your weapon to do this.
If the person(s) flee can you shoot them..I wouldn't. If they attack you, use your best judgement. Just no bullet holes back to front, they cause problems.