I do not see any reason as why it should not work but student/education version of SOLIDWORKS is for limited period. So beware of that.
You might want to check this out Mastercam 2017 for SOLIDWORKS Home Learning Edition Demo Software (HLE)
Does it have to be MASTERCAM?
Try HSMWORKS from Autodesk Free Software for Students & Educators | HSMWorks Ultimate | Autodesk
Its very good and works well with SOLIDWORKS - which is where it was originally developed for.
Yes you can. Simply download the Mastercam HLE (Home Learning Edition), and when you install it'll ask if you want to install the standalone software or Mastercam for Solidworks.