For a given agile project ,practice the role of a tester on a scrum team.

I think the role of a tester in a scrum team is being a quality evangelist.Being one of the most critical and analytical member of the team who can identify functional, usability and performance issues ; They can help product owner in triaging the issues so that with a minimum risk system can be launched in the production.
Well having said that, a developer can do the same. A developer can write tests based on product owner requirement, he can test and troubleshoot the performance and security issues. Security starts from the code. But then it becomes the question of education

Do the developers know secure coding standards ? Do they understand performance issues caused by their own codes.

If the developers can be educated enough on these skills, then tester role would be more on a quality assurance who can help in the way things should be done.
I have worked as QA Test manager, Test lead and a test/automation consultant in agile project. As a QA Manager I was

Helping my testers in a completing the testing
Reviewing their test designs
Reporting to the management in a daily progress report.

Test Lead and that is when we had 5 scrum teams working together, I was part of one of the scrum teams together but I was across all scrum teams and was upskilling the other testers on different skills e.g. integration testing , reporting etc.

In the other project I worked as a tester and automation consultant in one of the teams. The acceptance criteria was written and given by the product company whose product we were implementing in our project. Each user story had automation as an acceptance criteria. What automation meant in that story wasn't only automation of UI business process tests but the automation of testing logic. Any way I ended up taking the responsibility of automation for the user stories. In each story we were building screens of a workflow. Now the thing with the configuration is that product owner can change the requirements any time based on the input from the business and that can impact the automation big time. In a story you would say that you have completed automation and then there is the change and then you bring that task back in progress. So you fix the code to pass the automated test cases for that story.