Can I secure a 12v battery to my bicycle to charge it? And then attach a 12v horn to it?
(I'm Dutch too. I assume you know this is illegal?)

A 12V accu needs around 15V while charging. You could get some juice at that level out of a standard 6V dynamo by using a voltage-doubling rectifier:



(do not use the 'earth' connection, just the + and -. 1N400x will do for the diodes, 1000uF 35V (to be on the safe side) for the elco's.

I asssume you won't be carrying a standard 12V car accu with you? A standard headlamp is 6V 0.5A, so after doubling you might hope for let's say 100..200mA. A 50Ah car battery would take 250 .. 1000 hours of cycling to get charged. (depending on a lot of unknow factors)

You should not overcharge a car accu, but I think that is the least of your worries :)