Will Ferrell does not appear in The Princess Diaries (2001)—credited or uncredited.
This is a persistent internet myth, likely fueled by:
The cast includes Anne Hathaway, Julie Andrews, Héctor Elizondo, Heather Matarazzo, and Mandy Moore. Ferrell is nowhere in the credits, dailies, or cutting room floor.