Yes! But you have to be extra cautious.
Never put the filler in the washing machine. Instead, soak it in soapy water (use a mild detergent) for 15-20 minutes.
Then, rinse it with normal water and let it dry thoroughly in the sun.
It's better to buy an extra pillowcase so that you don't always need to wash the filling.
So, you can simply remove the case and give it a quick machine wash.