In Postgres, how can I calculate cume_dist (relative rank) over the entire table, but only for a single row?
You need to first apply the function in the whole table and then restrict the results with WHERE:

SELECT r.rank
FROM
  ( SELECT f.data, cume_dist() OVER (ORDER BY f.count ASC) AS rank
    FROM foo AS f
  ) AS r
WHERE r.data = 'bar';


Alternatively, you could calculate the function with 2 subqueries:

SELECT
    ( SELECT COUNT(*) 
      FROM foo 
      WHERE count &lt;= (SELECT count FROM foo WHERE data = 'bar')
    ) 
  * 1.0 /
    ( SELECT COUNT(*) FROM foo )
  AS rank ;


or with the new FILTER syntax:

SELECT COUNT(*) FILTER 
                (WHERE f.count &lt;= (SELECT count FROM foo WHERE data = 'bar')) 
       * 1.0 / COUNT(*) AS rank
FROM foo AS f ;