Set up new publication on SQL Server 2014 database which is part of an availability group
I found a solution for my problem and like to share it.
Solution
By using the fourth parameter ignore_distributor I could get around the problem and was able to set option publish for my db.
exec sp_replicationdboption @dbname = N'mydatabase', 
                            @optname = N'publish', 
                            @value = N'true', 
                            @ignore_distributor=1

But unfortunately it wasn't solving my overall issue on creating a new publication on this existing publisher.
New (second) Problem
The next step was to create the log reader agent job by executing the following command.
EXEC sys.sp_addlogreader_agent @job_login = N'&lt;domain user&gt;', 
                               @job_password = N'&lt;password&gt;', 
                               @publisher_security_mode = 0,
                               @publisher_login = N'&lt;username&gt;',
                               @publisher_password = N'&lt;password&gt;';

It resulted into the following error

The Publisher 'ServerB' does not exist. To view a list of Publishers, use the stored procedure sp_helpdistpublisher.

Ok, strange as I had a running publication from this server. So, I was checking it by executing the mentioned SP on my distributor. The result was showing me my publisher correctly. So far so good. Where is now the problem? Even after checking a couple of other thinks on my publisher I wasn't able to find any think wrong.
Let's check the distributor and run a trace when I executed my above command.
At the end the issue was created by the system procedure sp_MSreplagentjobexists. It was checking the publisher configured in the table dbo.MSreplservers within the distribution db. Bingo! My publisher was missing in there. I only found my original publisher in there. So, getting the server id from sys.server and insert the current primary node of my availability into this table worked like a charm.
The last think I had to do was to redirect my publisher which are running on an availability group to my AG listener.
-- redirect ServerA
exec sys.sp_redirect_publisher
       @Original_publisher = 'ServerA_primary_node',
       @Publisher_db = 'mydatabase_to_publish',
       @Redirected_Publisher = 'AGListener';
GO

-- redirect ServerB
exec sys.sp_redirect_publisher
       @Original_publisher = 'ServerB_seconary_replica',
       @Publisher_db = 'mydatabase_to_publish',
       @Redirected_Publisher = 'AGListener';
GO

Finally my new publication was working :)
So, I am not sure if this a bug and configuration issue made in the past. As I have no idea how and when the entries are made in the table MSreplservers of the distribution.
Any thoughts?