Stochastic models of reaction-diffusion systems are important for the study of biochemical reaction networks where species are present in low copy numbers or if reactions are highly diffusion limited. In living cells many such systems include reactions and transport on one-dimensional structures, such as DNA and microtubules. The cytoskeleton is a dynamic structure where individual fibers move, grow, and shrink. In this paper we present a simulation algorithm that combines single molecule simulations in three-dimensional space with single molecule simulations on one-dimensional structures of arbitrary shape. Molecules diffuse and react with each other in space, they associate with and dissociate from one-dimensional structures as well as diffuse and react with each other on the one-dimensional structure. A general curve embedded in space can be approximated by a piecewise linear curve to arbitrary accuracy. The resulting algorithm is hence very flexible. Molecules bound to a curve can move by pure diffusion or via active transport, and the curve can move in space as well as grow and shrink. The flexibility and accuracy of the algorithm is demonstrated in five numerical examples.