When I see situations like the one you explained, I email the PI and ask if there needs to be an adjustment to the payroll distribution to reflect work performed on project A. If there is no pay to support the effort, I ask the PI to confirm that work performed is occurring outside the student's RA appointment.
I am unaware of a policy that prohibits us from processing documents such as the one you described, but I do think it's my duty to ask the appropriate questions and document the PI response. I include the entire email conversation as back up to whatever financial transaction is being processed. If it's an ISO charge that I can't upload to, I leave a comment summarizing the situation and include a pdf of the email labeled with the document number in the grant file.