I figured out how to do this by using the getModule() method.
So now my WebHelper method looks like this:
public function seeCookieMatches( $pattern ) {
// Codeception 2.x
$cookies = $this->getModule( 'PhpBrowser' )->client->getCookieJar()->all();
// Codeception 1.x
$cookies = $this->getModule( 'PhpBrowser' )->session->getDriver()->getClient()->getCookieJar()->all();
// [...]
}