As you see from the discussion subsequent to your post the original quote is from
Schopenhauer, Arthur: Über die Freiheit des menschlichen Willens (= On the Freedom of the Will). Brockhaus, Leipzig 1868, p.68. It reads
You can do what you will, but in any given moment of your life you can will only one definite thing and absolutely nothing other than that one thing. = Du kannst thun was du willst: aber du kannst, in jedem gegebenen Augenblick deines Lebens, nur Ein Bestimmtes wollen und schlechterdings nichts Anderes, als dieses Eine."
The question whether Schopenhauer is right belongs to psychology. We know that some persons in certain situations are unable to make a rational decision between two opposite possibilities (exemplified by Buridan's ass).
Einstein's statement
A man can do as he will, but not will as he will.
considers quite a different point of human nature. Einstein explains the meaning of this statement just before:
In human freedom in the philosophical sense I am definitely a disbeliever.
Everybody acts not only under external compulsion but also in accordance
with inner necessity.
Einstein stresses that our actions are determined by two diffent kinds of constraints: Exterior and interior constraints. Hence instead of - interior - free will Einstein sees interior constraints. Unfortunately, in this passage Einstein does not give any argument for his rebuff to the concept of free will.
A well-known philosopher who votes for the existence of free will is Kant; notably in his works on practical philosophy. Because Kant takes free will as presupposition for any moral action.
Today the issue of free will is investigated also in the field of neuroscience. Until now, neuroscience like any other natural science has no other means to operate than to employ strict causality.
I expect: Further investigations from neuroscience will show, how former experience shapes our preferences, which serve as standard for the interior evaluation of possible alternatives for future action. This deterministic process of decision is shielded because it is unconscious in general.