I'm pretty sure they can...just a guess though. Most herbs seem to be pretty hardy, so I think it would be ok. Maybe the only thing to worry about is making sure its a big enough pot so they have enough room...I think herbs have extensive root systems. Hopefully someone who knows more will give you a better answer!
People grow different herbs together all the time so I don't see why you couldn't as long as they have similar requirements for amount of sun, amount of water, fertilizer, etc. I don't grow either one of those so I don't know if they have the same requirements or not.