I wonder whether the following examples can have two meanings:
talking about something in general
talking about a specific something.
Do you guys agree?
Example 1:
I don't like a dog.
I think it can be two different meanings: "I don't like dogs in general" or "There is a dog I don't like."
Example 2:
I don't like a dog who barks.
I think it can be two different meanings: "I don't like dogs who bark in general" or "There is a dog that barks who I don't like."
Best Answer
Neither of your examples is idiomatic.
English speakers would not use these constructions, so the question doesn't really arise.
If you dislike dogs, you would say: I don't like dogs (plural)
If you dislike a particular dog, you would say: I don't like the/this/that dog.
Equally, we don't talk about a dog who... It's a dog that..
Even so, we wouldn't say, I don't like a dog that barks. It's grammatically correct but not natural.
The natural construction is: I don't like barking dogs. or I don't like dogs that bark.
You can make statements such as: I don't like a policeman in a dirty uniform, meaning that you disapprove of any policeman in a dirty uniform.
If it were a particular policeman, you would say ...the policeman...
There isn't really much room for ambiguity.