Well.... it depends.
IF the document states mandated directives, then I suspect that legally, that's required. But you'd need to speak with an attorney. BUT if the issue is simply a WISH.... something the will/trust states as a desire... then I doubt that's legally binding. Again, an attorney might be suggested. It probably depends on the nature of the document and how the desire is expressed.
But IMO, the receiver SHOULD abide by the request. This is, after all, a GIFT. The donor certainly can suggest how they want it used. The receiver should be humble and grateful.
Example: A church member dies and leaves his church $100K. And the will says, "For the Building Fund." Now, could the church use that money to pay various bills and give the staff much needed raises in pay? Probably... but I find that disrespectful.
.