At least my version of at
prints the created job number when adding the job, it should be fairly trivial to extract it from there:
$ echo /bin/true | at now + 1hour
warning: commands will be executed using /bin/sh
job 5 at Fri Jun 7 14:13:00 2013
$ echo /bin/true | at now + 1hour 2>&1 | tail -1 | cut -f2 -d" "
6