If you have all of the required private information, you can absolutely create an identical transaction.
Let's look at https://solscan.io/tx/2EkndYmogcyHEcckfvaYmLXcqvvWC1AutSZE77y1gsDsCSS15PQ5sWV4NNZwqx7qUvNkN7H8GhmDZ8hE35dj98fP as an example. This transaction contains an instruction to transfer 620 tokens of mint AbnTggpTujbdAiJtyhH9WtK2CqXk44W7GipyJXkopBDd
from AqUzLDLJ1LhLv9gERjEn78j4PMEpvyWJpkSTuWQ54KwD
to EdkpJiv7hgspKcEeYL9JmDaipRQH6rd9xTySZwxB3Whg
, signed by GrX7rZAjCFH9htKfuxYEMGNSg1mDnr5dmwYhBgVmgdvR
. The only private part here is the signature by GrX7rZAjCFH9htKfuxYEMGNSg1mDnr5dmwYhBgVmgdvR
, so you would need the private key in order to sign a new transaction.
On the other hand, if you duplicate the exact transaction as is, and resend it to the network, it will get dropped as a duplicate. You need a new signature referencing a new blockhash (https://docs.solana.com/terminology#blockhash), which requires the private key.
As for createAssociatedTokenAccount
, it's a standard for associating a token account to an owner. More info can be found at https://spl.solana.com/associated-token-account