I'm not sure how code reads in Texas on this but you're existing outlet and light switch themselves may not even be up to code. Some areas won't allow you to bury junction boxes or outlets behind drywall. Being as that attic is not part of the living space there's a chance it may or may not be up to code itself. I would check into that first if code is your concern which it appears to be based on what you said. That aside, what you've described for a solution to power your projector is probably the route I would take even if just temporary until I could run a receptacle box into the ceiling nearby.