Start by having a look at http://hbase.apache.org/book.html#developer.
Yes, you can create your own build and run it on an Ambari-managed cluster. I do this regularly for testing patches on a real cluster. I like to create the binary tarball, upload to the cluster machines, unpack on each machine, and create a symlink from the /usr/lib/hbase/lib -> /path/to/unpacked-patched-build/lib. Restart the HBase services, and you can verify the version number from the Master and RS webUI’s. The version number should match your build.
...

Yes, you can create your own build and run it on an Ambari-managed cluster. I do this regularly for testing patches on a real cluster. I like to create the binary tarball, upload to the cluster machines, unpack on each machine, and create a symlink from the /usr/lib/hbase/lib -> /path/to/unpacked-patched-build/lib. Restart the HBase services, and you can verify the version number from the Master and RS webUI’s. The version number should match your build.