Can you use Prefect for transformations? Absolutely. Is it the right tool for the job? As always, that depends on your circumstance. If you're familiar with dbt (since you mentioned it), I'd personally connect Prefect with dbt and let each tool do what it does best (orchestration and transform, respectively). But, since you can pretty much write any python code you want and run it in Prefect, the sky's the limit. If the data is just some simple work to "tinker" and learn, I've done work with pandas and polars with no issues.
We're ramping up Prefect in our organization to manage all orchestration between our various tools (Fivetran, Airbyte, S3 loads, Snowflake tasks, eventually dbt, internal audits, batch jobs, etc.) so we have a single place to manage data workflows.