Yes it is legal in either the front or rear facing direction (according to the age/weight of the child). You just have to turn the airbag off on the passenger side if the truck has airbags. Generally it's safer to put the child in the passenger seat instead of the middle because usually the driver's side airbag will still deploy over the middle seat area in a bench seat truck, so by turning off the passenger side airbag, the middle seat passenger would likely still be impacted by the airbag.
When my husband and I were first married, the only vehicle we had was a single cab truck so our daughter had to ride in it. We always secured her in her car seat and in the passenger seat (it didn't have a passenger side air bag). Definitely not ideal but you do what you have to in the safest way possible. Thank goodness we now have better vehicles for a family.
I used to have a Jeep Wrangler and it had a manual turn off for the passenger air bag (you had to use the ignition key to do so).