can you post the code you tried, and a schematic diagram of how you wired it?
We could speculate for days without those things
In theory what you want to do should be possible:
All AVR ports have true Read-Modify-Write functionality when used as general digital
I/O ports. This means that the direction of one port pin can be changed without uninten-
tionally changing the direction of any other pin with the SBI and CBI instructions... Each output buffer has symmetrical drive
characteristics with both high sink and source capability. The pin driver is strong enough
to drive LED displays directly.
(p.51 of the Atmega8 datasheet)