What you are looking for is a Pseudo Random Function that should be indistinguishable from uniform, even if the key material that is passed to it is not. One potential problem with your scheme is that the AES key schedule is not particularly good at extracting the entropy from keys that are not selected (pseudo-)randomly, such as passwords and pass-phrases. This is e.g. demonstrated by the related key attacks against AES-256. You could fix this by using CBC-MAC with a constant key as key extractor, before you use AES-ECB for "hashing" the password. (A similar technique is e.g. used in FIPS 180-4 for condensing the entropy generated by the entropy source.) That is:
Let $K_0$ be a fixed constant key.
In order to hash a password $P$ (in the form of an octet string) with a 128 bit (unique) salt $S$, do the following:
- Pad $P$ with a single octet 0x80 followed by zero up to 15 octets with the value 0x00, to form an octet string $P'$ of a length that is a multiple of 16.
- Divide $P'$ into $k$ blocks $p_1...p_k$ of octet length 16. Let $c_0$ be a zero valued block and $p_{k+1} = S$.
- For $i$ from 1 to $k+1$, let $c_i = AES_{K_0}(c_{i-1} \oplus p_i)$
- Let $K = c_{k+1}$.
- Let $h_0$ be a zero valued block.
- For $i$ from 1 to $iter$, let $h_i = AES_{K}(h_{i-1})$
- Output $h_{iter}$.
Note that the above algorithm introduces three features not mentioned in your question: Firstly, it supports passwords and pass-phrases of arbitrary length. Secondly, it introduces a salt that should be used to prevent an attacker from building a dictionary of common passwords. Thirdly, it introduces an $iter$ parameter that increases the required effort for brute force testing (in particular) low entropy passwords.