Basically, you need two accumulators to keep track of the current index and the maximum index found for the element. Then you just recurse to the end of the list and return the "maximum index" value.
let rindex elem =
let rec find_index i max_found = function
| (x::xs) when x = elem -> find_index (i+1) i xs
| (_::xs) -> find_index (i+1) max_found xs
| [] -> max_found
in find_index 0 (-1);;
This can also be expressed pretty simply as a fold:
let rindex elem ls =
let find_index (i, max) elem' = (i+1, if elem' = elem then i else max)
in snd (fold_left find_index (0, -1) ls);;