I can't imagine any reason you shouldn't, with the exception of the obvious safety issues.
Off-roaders use jerrycans on the roof rack all the time, or hanging off the rear bumper.
My larger concern would be the movement of fuel in a half-filled container at speed. A well-sealed container designed for external carrying should be fine. If you use it, use the whole container, because you don't want 40 lbs of fuel sloshing sideways 8' off the ground.