The United States would cut off funding for the main U.N. agency that provides aid to Palestinians in Gaza under a spending agreement on track to soon become law, according to two people familiar with the plan.