You need to have a [0,1] alpha mask for the object. Then you can use a directional filter to blur the object and it's mask, for example, as done here:
https://www.packtpub.com/mapt/book/application_development/9781785283932/2/ch02lvl1sec21/motion-blur
Then use the blurred mask to alpha blend the blurred object back into the original unblurred or other scene:
#Blend the alpha_mask region of the foreground over the image background
#fg is foreground, alpha_mask is a [0,255] mask, image is background scene
foreground = fg.astype(float)
background = image.astype(float)
#Normalize alpha_mask
alpha = alpha_mask.astype(float) / 255
# Multiply the foreground with the alpha_mask
foreground = cv2.multiply(alpha, foreground)
# Multiply the background with ( 1 - alpha )
background = cv2.multiply(1.0 - alpha, background)
# Add the masked foreground and background, turn back to byte image
composit_image = cv2.add(foreground, background).astype(np.uint8)