This is actually incorrect. In that case, he was stopped lawfully and a terry frisk was also considered lawful. However, the Minnesota Supreme Court and Supreme Court of the United States both ruled that a terry frisk is limited in scope to being a protective pat down. The officer knew Dickerson was unarmed, and his pat down went beyond the outer clothing and into the pockets of Dickerson, which exceeded the scope of a terry frisk. Additionally, the justices of the SCOTUS ruled that the officer determined that the cocaine was contraband only after conducting an expanded search, which went past the plain view doctrine. Because this further search of respondent's pocket was constitutionally invalid, the seizure of the cocaine that followed is likewise unconstitutional.
If a police officer lawfully pats down a suspect's outer clothing and feels an object whose contour or mass makes its identity immediately apparent, there has been no invasion of the suspect's privacy beyond that already authorized by the officer's search for weapons; if the object is contraband, its warrantless seizure would be justified by the same practical considerations that inhere in the plain-view context. However, since the officer in question had to further probe the object by sliding and manipulating it, it was considered not immediately identifiable.