Here is a more concise way of doing the same thing.
from ase.io import read
bec = read("bec_replaced.vasp").write("bec_replaced.xyz")
It is not needed to import ase and import the functions, you want to do one or the other (This is a python thing not ASE). read also returns an atoms object with a write function built in, so there is no need to import a write function. ASE will also assume the file format from the file extension, however you might need to use the format argument when it detects things incorrectly.
Optionally, use the command line instead
ase convert bec_replaced.vasp bec_replaced.xyz