When Is It Okay to Use AI? A Decision Framework for Students and Professionals