Are PhD students allowed to use funding for a custom office setup?
As the comments already say, this is to a large extent dependent on the terms of the grant. Most grants have a lump sum (the "overhead") which they directly pay to the university to cover office supply, equipment, etc., so that they actual grant cannot be used for these items. However, there are certainly grants that are more flexible in their terms.

Generally, your best bet when it comes to productivity-increasing office supply would be your advisor. (S)he will usually have a hardware budget that he may use for things like a dual-screen setup for students or a fancy keyboard, and (s)he has a strong interest in you being productive. One should also keep in mind that even objectively overpriced single items of equipment (e.g., those vastly overpriced Apple mice) are just a small dot in the lab hardware budget, so many advisors really are quite happy to dole out for them if they think it will make the student more happy (even if they are personally not seeing the point at all).

One specific comments regarding the dual-monitor setup: most labs have an abundance of abandoned screens from previous lab members sitting in some equipment storage. If you don't insist on getting a new screen, nobody will take issue when you ask to get one of the old screen as a secondary display.