Answer:
yes thermal energy be uses to do work
exp. if we have a gas enclosed in a cyllinder with frictiion less piston,when we provide a themal energy then electrons aquire sufficient themal velocity and moving zig-zag path. so they change the volume of the gas and change the position of that piston.
so the work is done= F.d, here angle between force and distance is zero.