As a general rule it is possible to take relief - i.e. to move your ball from an awkward spot without penalty - from anything artificial on a course.
Many footpaths, roads, railings and things like stakes around baby trees are regarded as 'immovable obstructions'.
This means you may move your ball and drop it - usually within one club length from the point of nearest relief, or the nearest place not obstructed.
This does not apply when:
The obstruction is classed as an 'integral part' of the course, as above at the 17th at St Andrews - known as the Road Hole
The road or wall is used to mark out of bounds
If the obstruction is movable, such as a tractor or rake, it may be moved out of the way without penalty.
If the ball moves it must be replaced, without penalty.