A Hybrid will do trails and in fact- in the height of the summer when there is no mud- it can do full offroad . An MTB will do both but not fare too well on the road.
And forget the Used Carbon mountain bike. The previous owner will not be able to guaranty that he has not hit a few downhills exceptionally hard- found a few trees on the way or even dropped it at speed. Mountain bikes are tough. Carbon is not.
And I am an "EX" mountain biker that has dropped more than my share of Aluminium Mountain bikes and yet to break one. MTB's have to be tough and Aluminium has proved to be the material of choice- Ti is better but not many about due to the cost.
__________________
How long was I in the army? Five foot seven.
Spike Milligan