少し試行錯誤が必要かもしれませんが、可能です。以下のようなアプローチが起点として機能するかもしれません:
User.find_each do |user|
untitled_topic_count = user.topics.where(title: "").count
titled_topic_count = user.topics.where.not(title: "").count
if untitled_topic_count > 0 && titled_topic_count == 0
# トピックおよび/またはユーザーを削除
end
end