I machine stitch the ends of my fabric before I wash.
I also set my washer on the handwash cycle.
I have very little fraying. The cheaper the fabric the more fraying you wil have because it will be a looser weave fabric.
The ends of the fabric have to be trimmed/straightened when you start cutting anyway so a little fraying isn't a problem.