Mysql supports the ROW_NUMBER() function.
SELECT rank
FROM (
SELECT ROW_NUMBER() OVER (ORDER BY meta_value) AS rank,
meta_key, meta_value, post_id
FROM wp_postmeta
WHERE meta_key = 'points'
ORDER BY meta_value
) AS r
WHERE post_id = 18;
But I'm not sure it performs any better than your solution.