bbPress will not have access to WordPress’ functions unless you manually tell bbPress to load WordPress first. This integration step is also known as “deep” integration, it is a totally optional part of integration and is not required to get shared cookies and logins working. In order to do it,
you need to put require_once('path/to/wp-blog-header.php'); in bbPress’ bb-config.php (wp-blog-header is in the same directory as WordPress’ wp-config.php file). Doing this will add quite a lot of weight to your bbPress installation as it will cause WordPress to load in it’s entirety. Your best option is to try to emulate the functionality you require inside a bbPress plugin.