I want to draw (for instance) a line on HTML5 canvas. Then I want to add an image bevel effect to that line. So it looks 3D, like a piece of string sitting on the canvas. Has anyone seen an image processing effect that can do something along that line?

I think the only way to do that kind of drawing is to draw step by step the curve, and apply at each step a texture perpendicular to the local tangent.
But you seem to want another feature : be able to 'twist' the texture depending on the part of the curve. Here there are so mant options to parameterize this i can't guess how you'll store/interpolate the twist of the texture. So below i just had the texture 'turn' with t, the parameter of the bezier curve.
http://jsfiddle.net/gamealchemist/YPKV9/
Example : Image showing a texture applied to the curve, and below the same curve with the same texture that turns along with the curve.
With