Normally you can remove the stakes, including the hazard markers stakes if your ball is not in the hazard. see rule 24-1
However, courses can make a local rule that prevents you from removing them, it which case they are classed as immoveable obstruction and you can get a freed drop - rule 24-2



