Is an accent sufficient in forming a dialect?

If the accent deviates only in intonation, probably not: intonations are difficult to capture schematically; and by the time you have a different intonation, typically there’ll be a whole lot of other differences anyway.

If (as your question posits) you have only phonetic differences, but not phonological (so the same spelling system does just fine for both), and not lexical: again, typically not. The distinction between [pɑːθ] or [pæθ] is a significant isogloss of Northern vs Southern England; but traditionally those differences are accompanied by differences in lexicon and morphology (and often enough phonology), and they are what has been prioritised in the differentiation: they are bigger ticket items, and make for a more obviously distinctive linguistic system.

With the prevalence of standard English, the dialectal differences in England have been attenuated, so the phonetics is more important as a differentiator.  But that’s not been a normal state of affairs.