is it possible for me to buy the masterwork component and craft the rest of the weapon myself?
I would say anyone can buy a thing if there is someone willing to sell that thing to them.
The real question is can you use that masterwork component effectively?
I'm not able to craft the masterwork component
As you're not able to craft the masterwork component, I would say it's no. The reason being that without the correct level of skill you would not be able to make effective use of the masterwork component. Therefore, any item you made with it would be, at best, a normal item with one fancy bit on it.
Besides, if you could do it, so can the NPC's. There's a thought for you, a screaming hoard of "insert this week's monster" running at you with masterwork weapons and armor they couldn't possibly craft for themselves under normal circumstances on their own, but got by stealing a load of masterwork parts in that caravan they took out last month.
So, I'd say yes you can buy it but it wouldn't do you any good and that's as much about not having NPC's do it as not having PC's do it.
Could I see another GM calling it the other way? Yes, I can see that. It comes down to what is allowable in the game world that GM wants to run in. Is it possible to buy a masterwork blade and put on your own guard and pommel? If you have the skill to do it, yes. How much skill? More than making a normal sword? That's the debatable part. I would come down on the side of needing master skill to go with master components if you want the master bonus.
Lets look at RAW again.
To create a masterwork item, you create the masterwork component as if it were a separate item in addition to the standard item. The masterwork component has its own price (300 gp for a weapon or 150 gp for a suit of armor or a shield, see Equipment for the price of other masterwork tools) and a Craft DC of 20. Once both the standard component and the masterwork component are completed, the masterwork item is finished. The cost you pay for the masterwork component is one-third of the given amount, just as it is for the cost in raw materials.
Some may read that and say you could have two people sharing the work, one the "master" crafter making the hard bit and other, a "normal" crafter, putting it all together. After all it doesn't say which one has to put all the parts together.
Right, it doesn't say which has to put all the parts together. I would say the "normal" one could not put it together effectively, hence no masterwork bonus, just a normal item with a really nice piece on it. To get the masterwork bonus, it would have to be put together by a "master". The "normal" could make the regular parts but the "master" has to put it all together at the end if you want a masterwork bonus for it.
Again, it has to do with what kind of world the GM is looking to make. Before ruling on it the GM should ask of themself, are masterwork swords on the hip of every 2nd level warrior or are they rare? That answer should guide them.